µ±Ç°Î»Ö㺠´úÂëÃÔ >> Ajax >> ajax Ϊʲôʲô״̬¶¼²»ÍùÉÏÖ´ÐÐÄØ
  Ïêϸ½â¾ö·½°¸

ajax Ϊʲôʲô״̬¶¼²»ÍùÉÏÖ´ÐÐÄØ

Èȶȣº146   ·¢²¼Ê±¼ä£º2012-08-02 11:35:26.0
ajax Ϊʲôʲô״̬¶¼²»ÍùÏÂÖ´ÐÐÄØ£¿
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;
    } 
  Ïà¹Ø½â¾ö·½°¸