game/ajax.php

20 lines
600 B
PHP
Raw Normal View History

2022-06-06 21:30:34 +00:00
<?
setlocale(LC_CTYPE ,"ru_RU.CP1251");
if(isset($_GET['test'])) {
2023-01-10 16:29:32 +00:00
echo 'Тест 5<br>'.$_GET['test'].'<br>'.$_POST['test_post'].'';
2022-06-06 21:30:34 +00:00
die();
}
2023-01-10 16:29:32 +00:00
echo 'Тест 1<br>';
2022-06-06 21:30:34 +00:00
?>
<script src="https://new-combats.com/js/jquery.js" type="text/javascript"></script>
<script>
function test() {
2023-01-10 16:29:32 +00:00
$('#test_side').html( 'Тест 3' );
$.post('/ajax.php?test=Тест 6&',{'test_post':'Тест7'},function(data){ $('#test_block').html( data ); });
2022-06-06 21:30:34 +00:00
}
</script>
2023-01-10 16:29:32 +00:00
Тест 2<br>
2022-06-06 21:30:34 +00:00
<div id="test_side"></div>
<div id="test_block"></div>
<br><br>
2023-01-10 16:29:32 +00:00
<a href="javascript:test();">Протестировать запрос</a>