This article is mainly for everyone to bring an article of IE under the AJAX submission garbled fast solution. Small series feel very good, now share to everyone, also for everyone to make a reference. Follow the small series together to see it, hope to help everyone.
Add a protective measure to the position of Chinese characters: encodeURIComponent (ParentID)
function Loadcity (parentid) {var city = ' ${hotel.city} '; $.ajax ({ URL: './listcity.jspx?prov= ' + encodeuricomponent (parentid), type: ' GET ', dataType: ' JSON ', timeout:5000, error:function () {alert (' Load city list failed! ');}, success:function (msg) {$ ("#city"). empty (); $. Each (eval (msg), function (I, item) {if (item.city ==city) {$ ("<option value= '" + item.city + "' selected = ' selected ' >" + item.city + "</option>"). AppendTo ($ ("#city"));} else{$ ("<option value=" + item.city + ">" + item.city + "</option>"). AppendTo ($ ("#city"));} );} });}
Online said another kind of add ContentType method seems to use, O (︶^︶) o Alas, or self-reliable AH ~ ~
ContentType: ' application/x-www-form-urlencoded; Charset=utf-8 ',