ajax Ϊʲôʲô״̬¶¼²»ÍùÏÂÖ´ÐÐÄØ£¿
- JScript code
for (var e = 0; e < arr.length; e++) { $.ajax({ type: "POST", url: "Deliver.aspx?S_delClient=" + arr[e].CodelistId, async: false, dataType: "text", success: function (data) { if (data != "") { var pa = JSON.parse(data); debugger; for (var x = 0; x < pa.length; x++) { //ÅжÏ״̬ if (pa[x].ClientOutStatus != "2") { alert("ÇëÑ¡Ôñ״̬ΪÒÑÉóºËµÄµ¥¾Ý½øÐз´ÉóºË²Ù×÷¡£"); } } } } }); return false; }
------½â¾ö·½°¸--------------------
Ôö¼Óerror»Øµ÷¿´¿´ÊDz»ÊǶ¯Ì¬Ò³³öÎÊÌâÁË
- JScript code
for (var e = 0; e < arr.length; e++) { $.ajax({ type: "POST", url: "Deliver.aspx?S_delClient=" + arr[e].CodelistId, async: false, dataType: "text", error:function(xhr){alert('³ö´í\n'+xhr.responseText);},////// success: function (data) { if (data != "") { var pa = JSON.parse(data); debugger; for (var x = 0; x < pa.length; x++) { //ÅжÏ״̬ if (pa[x].ClientOutStatus != "2") { alert("ÇëÑ¡Ôñ״̬ΪÒÑÉóºËµÄµ¥¾Ý½øÐз´ÉóºË²Ù×÷¡£"); } } } } }); return false; }