JS转换HTML转义符 //去掉html标签 1 2 3 function removeHtmlTab(tab) { return tab.replace(/<[^]+?>/g,'');//删除所有HTML标签 } //普通字符转换成转意符 1 2 3 function html2Escape(sHtml) { return sHtml.replace(/[<>&"]/g,function(c)…
JS转换HTML转义符 //去掉html标签 1 2 3 function removeHtmlTab(tab) { return tab.replace(/<[^]+?>/g,'');//删除所有HTML标签 } //普通字符转换成转意符 1 2 3 function html2Escape(sHtml) { return sHtml.replace(/[<>&"]/g,function(c)…