game/ajax.php
2022-06-07 00:30:34 +03:00

20 lines
556 B
PHP

<?
setlocale(LC_CTYPE ,"ru_RU.CP1251");
if(isset($_GET['test'])) {
echo 'Òåñò 5<br>'.$_GET['test'].'<br>'.$_POST['test_post'].'';
die();
}
echo 'Òåñò 1<br>';
?>
<script src="https://new-combats.com/js/jquery.js" type="text/javascript"></script>
<script>
function test() {
$('#test_side').html( 'Òåñò 3' );
$.post('/ajax.php?test=Òåñò 6&',{'test_post':'Òåñò7'},function(data){ $('#test_block').html( data ); });
}
</script>
Òåñò 2<br>
<div id="test_side"></div>
<div id="test_block"></div>
<br><br>
<a href="javascript:test();">Ïðîòåñòèðîâàòü çàïðîñ</a>