这是一个愚蠢的问题,但我怎么能通过多个变量通过Ajax到PHP? 我试过,但并不完全符合我的需要:多个变量与jQuery发送ajax
function modifica(estado){
$.ajax({
type: "GET",
datatype: "html",
url: 'icallverifica.php',
data: "verifica=1$other=4&gethis="+alerta,
success: function(data) {
alert(data);
}
});
}
编辑:
也许那就是:
data: {
verifica : "xxx",
numero : "yyy"
}
但我会等大师帮
你的编辑应该是正确的值后对随后符号(&)(?)。 – Paul
也许是因为你在查询字符串中使用'$'而不是'&'? – Aaron
第二个代码snipet是最灵活的方式。为什么,你遇到麻烦了? –