iframes war
This commit is contained in:
parent
84c9be005c
commit
cf21a01c79
13
game.php
13
game.php
@ -83,6 +83,7 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
|
||||
src="http://placehold.it/32x32/33ff33?text=O"/></a>
|
||||
<a href="/moderators.php" title="Модераторы" target="main"><img src="http://placehold.it/32x32/33ff33?text=M"/></a>
|
||||
<a href="/forum.php" title="Форум" target="main"><img src="http://placehold.it/32x32?text=F"/></a>
|
||||
<a href="javascript:$('#game').load('/forum.php')"><img src="http://placehold.it/32x32?text=F"/></a>
|
||||
</header>
|
||||
<div id="game"></div>
|
||||
<div id="chat"></div>
|
||||
@ -95,7 +96,17 @@ if (!isset($_SESSION['uid'])) header("Location: index.php");
|
||||
</div>
|
||||
<script>
|
||||
$("#game").load("main.php");
|
||||
$("#chat").load("chat.php");
|
||||
|
||||
function loadlink(){
|
||||
$('#chat').load('chat.php',function () {
|
||||
$(this).unwrap();
|
||||
});
|
||||
}
|
||||
|
||||
loadlink(); // This will run on page load
|
||||
setInterval(function(){
|
||||
loadlink() // this will run after every 5 seconds
|
||||
}, 5000);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user