game/ajax.php

20 lines
564 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?
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>