test.php
ファイルに 1 つとファイルに 1 つの 2 つのクエリがありますtest2.php
... 5 秒ごとに div を更新したいのですが、div #test の内容は div test2 の内容によって上書きされます。なぜこうなった?どうすれば修正できますか?
<script>
$(document).ready(function() {
$("#test").load("test.php");
var refreshme = setInterval(function() {
$("#test").load('test.php');
}, 5000);
$.ajaxSetup({ cache: false });
});
</script>
<div id="test">
<?php
include ('test.php');
?>
</div>
<br>
<script>
$(document).ready(function() {
$("#test2").load("random.php");
var refreshId = setInterval(function() {
$("#test2").load('random.php');
}, 5000);
$.ajaxSetup({ cache: false });
});
</script>
<div id="test2">
<?php include 'test2.php' ?>
</div>