20 lines
544 B
PHP
20 lines
544 B
PHP
<?php
|
||
|
||
if(isset($_GET['test'])) {
|
||
echo 'Тест 5<br>'.$_GET['test'].'<br>'.$_POST['test_post'].'';
|
||
die();
|
||
}
|
||
echo 'Тест 1<br>';
|
||
?>
|
||
<script src="/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>
|