1. 经过html方法:
$(".js_info").html("~!`@#$%^& ";'<>=/~!·#¥%…&*()—+|`-=、[]{};‘:“,。/《》?↵*()_+|[]-={}:?,.")
后台返回的字符串:~!`@#$%^& ";'<>=/~!·#¥%…&*()—+|`-=、[]{};‘:“,。/《》?↵*()_+|[]-={}:?,."经过html方法,将进行转义的标签进行反转义成标签显示
1. 经过text方法:
$(".js_info").text("~!`@#$%^& ";'<>=/~!·#¥%…&*()—+|`-=、[]{};‘:“,。/《》?↵*()_+|[]-={}:?,.")
后台返回的字符串:~!`@#$%^& ";'<>=/~!·#¥%…&*()—+|`-=、[]{};‘:“,。/《》?↵*()_+|[]-={}:?,."经过text方法,将按照返回字符串输出不进行转义