0

Does anyone know a good alternative to xmlHttpReq (post method) that works with all UTF-8 characters?

For example, if you input this ال in this demo http://www.degraeve.com/reference/simple-ajax-example.php it will not work. However, if I use formdata new FormData(document.forms[0]) it works, but this method is not compatible with all browsers.

I'm looking for an all-round solution ? I'm currently using the same method as in the demo (link). It would be even better if I can change something in that script.

4

1 回答 1

1

该脚本只是使用了错误的转义 URL 参数的方法。window.escape不合适。它使用的地方escape,而不是只是使用encodeURIComponent,数据将被提交就好了。

于 2013-06-07T10:01:53.437 回答