/*匹配特殊字符*/ function stripscript(s) { var pattern = new RegExp("[-`~!@#$^&*()=|{}':;',\[\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"); var rs = ''; for (var i = 0; i < s.length; i++) { rs = rs + s.substr(i, 1).replace(pattern,''); } return rs; }
/*匹配特殊字符*/ function stripscript(s) { var pattern = new RegExp("[-`~!@#$^&*()=|{}':;',\[\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]"); var rs = ''; for (var i = 0; i < s.length; i++) { rs = rs + s.substr(i, 1).replace(pattern,''); } return rs; }