A quick solution for submitting Garbled text by Ajax in IE, and submitting Garbled text by ieajax

Source: Internet
Author: User

A quick solution for submitting Garbled text by Ajax in IE, and submitting Garbled text by ieajax

Haha, I tried so much and it still works with encodeURIComponent !!!!

Add a protection 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', ype: 'json', timeout: 5000, error: function () {alert (' failed to load the city list! ');}, 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 method for adding contentType on the Internet seems to be useless. o (too many requests) o alas, I am still reliable ~~

ContentType: 'application/x-www-form-urlencoded; charset = UTF-8 ',

The quick solution for submitting Garbled text via Ajax in IE is to share all the content with you in the editor. I hope you can give us a reference and support for the customer's house.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.