ajaxでpostを受け取る方法
同じ階層にあるtest.phpに向かってpostを送信し、その結果をhtml変数に受け取ります
$.ajax( { type: "POST", url: "test.php", data: {'test': test, 'name': 0, 'asdf': 'asdf'}, success: function(html) { alert(html); } });
受け取る側のphpでは下記のように指定します
<?php echo "come here"; echo $_POST['test']; ?>
ディレクトリ構成はこんな感じです
$ tree . ├── a.php └── test.php