我imaginery代碼:通陣列中的jQuery阿賈克斯
$(document).ready(function() {
$("#sub").click(function() {
info['moto'] = $("#moto").val();
info['motox'] = $("#motox").val();
$.ajax({
type: "POST",
url: "index.php",
data: "arr="+info,
success: function(msg){
$('.answer').html(msg);
}
})
})
})
我怎麼會做,在PHP文件收到後我可以用POST方法是這樣的:$_POST['moto']
和$_POST['motox']
或類似的東西?我應該改變什麼?謝謝。
這是有用的 – 2012-01-17 07:01:10