标签:style com amp mic strong mamicode inf ext hellip
1. 经过html方法:
$(".js_info").html("~!`@#$%^& ";'<>\=/~!·#¥%…&*()—+|`-=、[]{};‘:“,。/《》?↵*()_+|[]-=\{}:?,.")
后台返回的字符串:~!`@#$%^& ";'<>\=/~!·#¥%…&*()—+|`-=、[]{};‘:“,。/《》?↵*()_+|[]-=\{}:?,."经过html方法,将进行转义的标签进行反转义成标签显示
1. 经过text方法:
$(".js_info").text("~!`@#$%^& ";'<>\=/~!·#¥%…&*()—+|`-=、[]{};‘:“,。/《》?↵*()_+|[]-=\{}:?,.")
后台返回的字符串:~!`@#$%^& ";'<>\=/~!·#¥%…&*()—+|`-=、[]{};‘:“,。/《》?↵*()_+|[]-=\{}:?,."经过text方法,将按照返回字符串输出不进行转义
$("节点名").html("字符串")和$("节点名").text("字符串")区别
标签:style com amp mic strong mamicode inf ext hellip
原文地址:https://www.cnblogs.com/hanguidong/p/10382763.html