摘要: /*正则表达式 替换括号,尖括号等*/function toTxt(str) { var RexStr = /\<|\>|\"|\'|\&/g str = str.replace(RexStr, function(MatchStr) { switch (MatchStr) { case "<": return "&lt;"; break; case ">": return "&gt;"; break; case "\"" 阅读全文
posted @ 2013-02-04 15:54 最佳损友。 阅读(2233) 评论(0) 推荐(0) 编辑