摘要: 此方法用来将用户输入内容中的尖括号、引号等进行转义function html_encode(str) { var s = ""; if (str.length == 0) return ""; s = str.replace(/&/g, ">"); s = s.replace(//g, ">"); s = s.replace(/ /g, ""); s = s.replace(/\'/g, "'"); s = s.re 阅读全文
posted @ 2014-01-06 19:36 梅梅哇 阅读(12162) 评论(2) 推荐(0) 编辑