1
tdata = new Array();
tdata['id'] = "helloid";
tdata['name'] = "helloname";
tdata['location'] = "hellolocation";
tdata['about'] = "helloabout";
tdata['company'] = "hellocompany";
tdata['website'] = "hellowebsite";
$.ajax({
url: 'export.setsession.php',
data: { tdata: tdata.id
},
type: 'post',
success: function (output) {
//$(location).attr('href', 'index.php');
alert("girdsposted");
}
});
上述工作得很好,但我想傳遞數組作爲一個整體,如果這是可能的,如數據:{TDATA:TDATA},而不是僅使ID。這有可能做或有其他選擇嗎?我還沒有能夠在整個陣列進入PHP是某種形式的我可以讀...jQuery的.ajax的通過整個JavaScript數組到PHP
在此先感謝...