更新せずにページを更新して遊んでいて、いくつかのチュートリアルを読んで、次のコードを思いつきました。ただし、機能していないようです。ボタンを押しても何も起きないようです。
Index.php コード
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script>
function updateShouts()
{
$('#refresh').load('update.php');
alert('it works!'); uncomment this to know if your script works
}
</script>
</head>
<body>
<div id="refresh">
<?php
include('update.php');
?>
<button onclick="updateShouts()">Try it</button>
</div>
</body>
</html>
update.php コード
<?php
print strftime('%c');
?>