// 字符转义
html2Escape(sHtml) {
return sHtml.replace(/[<>&"]/g, function(c) {
return {
'<': '<',
'>': '>',
'&': '&',
'"': '"'
}[c];
});
}
javascript 转义函数
猜你喜欢
转载自www.cnblogs.com/mengfangui/p/9008043.html
今日推荐
周排行