內整個身體後我跑XMLHttpRequest
要求是這樣的:得到笨控制器
var data = JSON.stringify({
name : "123",
id : 12
});
window.console.log("Submitting: " + data);
var req = new XMLHttpRequest();
req.open('POST', "http://localhost/index.php/lorem/ipsum", true);
req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
req.onreadystatechange = function() {
if ( req.readyState==4) {
window.console.log("Sent back: " + req.responseText);
}
}
req.send(data);
你可以看到有沒有被傳遞名稱參數。
現在我想讀裏面lorem
控制器ipsum
功能JSON數據。 我該怎麼做? $this->input->post();
返回false :(
謝謝您的回覆!我知道我可以這樣做。我想知道是否有另一種方式,無標識符。可能會收到http請求正文。 – David 2010-12-03 10:13:25