0
我在这里发布了一段代码,我得到一个运行时错误。变量x
变化是价值Ajax调用内:JQuery变化的变量
$("#acquisto").click(function(){
var x = 0;
for(x = 0; x < numRighe; x++){
if($("#ch"+x).prop("checked") == true){
alert("#tr"+x);
$.ajax({
url:"eliminazioneRecord.php",
type: "GET",
data: { Codice: $("#ch"+x).val() },
success:function(result){
//$("#tr"+x).fadeOut("slow");
alert("#tr"+x);
},
error:function(richiesta,stato,errori){
alert("<strong>Chiamata fallita:</strong>"+stato+" "+errori);
}
});
}
}
});
我意识到,因为在Ajax调用x
前的警报具有的值是不同的成功函数内部的警报显示一个。我错在哪里?