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
스크립트 헤더를 확인 하시겠습니까?