Haha, try so much or encodeuricomponent it works.!!!!
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"));
});
}
});
}
Another way to add contenttype on the Internet seems to be no use, O (︶^︶) O Alas, or their own reliable AH ~ ~
ContentType: ' application/x-www-form-urlencoded; Charset=utf-8 ',
The above IE under the Ajax submitted garbled fast solution is small series to share all the content, hope to give you a reference, but also hope that we support cloud habitat community.