标签:
String.prototype.toHtmlEncode = function() { var str = this; str=str.replace("&","&"); str=str.replace("<","<"); str=str.replace(">",">"); str=str.replace("‘","'"); str=str.replace("\"","""); return str; }
用法
"".toHtmlEncode()
标签:
原文地址:http://www.cnblogs.com/gaocong/p/5790461.html