开发者

jQuery get and text return replacement character. How to solve?

开发者 https://www.devze.com 2023-04-09 15:55 出处:网络
If I use: $.get(\"url\",function(data){$(\"#destination\").text(data);}) in the .text of #destination the letters like èéàòùì become the replacement character.

If I use:

$.get("url",function(data){$("#destination").text(data);})

in the .text of #destination the letters like èéàòùì become the replacement character.

How do I solve it? Set the charsets is useless; 开发者_运维知识库I don't want to use .replace("strange character","");.

0

精彩评论

暂无评论...
验证码 换一张
取 消