[JavaScript] View plain copy print? $.ajax ({ type : "Post", url : "Busine_ In.action ", timeout : 40000, data: " Centerid= "+s, error : function (xmlhttprequest, textstatus, errorthrown) { alert ( Xmlhttprequest.status); alert (xmlhttprequest.readystate); alert (textstatus); alert (' Read timeout, check network connection '); }, dataType : "JSON", success : function (data) { alert ("1"); $ ("#select_div "). Hide (); &nBsp; str= ' <div style= " overflow:auto;height:430px;" > '; str+= ' <table border= "0" cellspacing= "0" cellpadding= "0" Width= "100%" class= "table2 muma_list" > '; str+= ' <tr> '; str+= ' <th align= left ' > Area </th> '; str+= ' </tr> '; $.each ( Data,function (i, n) { &NBSP;&NBSP;&NBSP;&NBSp; alert ("2"); alert (i); Alert ("n==" + N.length); if ("list" == i) { str+= ' <tr> '; str+= ' <td><a href= ' Javascript:unitedit (\ ' +n.areaid+ ') " title=" click Edit ">" + N.areaname+ ' </a></td> '; str+= ' </tr> '; } }); str+= ' </table> '; str+= ' </div> '; alert ("3"); $ ("#select_div "). HTML (str); } &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP}); The above code has entered the error, and
[JavaScript]View Plain copy print? alert (textstatus);
The pop-up is always parsererror [JavaScript] view plain copy print? alert (xmlhttprequest.status);
Eject 200 normal [JavaScript] view plain copy print? alert (xmlhttprequest.readystate);
Eject 4 Normal
Finally, the reason for the pop-up parsererror is a type problem, that is, the return type may be problematic. Sure enough, we found that the result return type in the action of the AJAX request in the Struts.xml file is not JSON