使用jQuery:
$.post("test.php", { json_string:JSON.stringify({name:"John", time:"2pm"}) });没有jQuery:
var xmlhttp = new XMLHttpRequest(); // new HttpRequest instance xmlhttp.open("POST", "/json-handler");xmlhttp.setRequestHeader("Content-Type", "application/json");xmlhttp.send(JSON.stringify({name:"John Rambo", time:"2pm"}));


