0
我在不刷新的情况下进行页面更新,并阅读了一些教程,并提出了以下代码。但它似乎没有工作。当你按下按钮时,似乎什么也没有发生。无刷新无法正常工作的网页更新
的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');
?>
我不完全确定你的意思是IoQ? – jskrwyk
注意您的脚本标题?