js正则判断值是否有非法字母
时间:2011-05-18 来源:flyhacker
//js正则判断值是否有非法字母
if(val.match(/hujintao|wenjiabao|jiangzemin|zhurongji|qiubojun|leijun|flg|falun|minghui|lihongzhi|tmd|nmd|fuck|sex|xxx|penis|viagra|tits|pussy|shit|damn|bastard|asshole|bitch|vagina|breastroot|root|admin|gamemaster|xoyo|kol/i)){
alert('error');
}
if(val.match(/hujintao|wenjiabao|jiangzemin|zhurongji|qiubojun|leijun|flg|falun|minghui|lihongzhi|tmd|nmd|fuck|sex|xxx|penis|viagra|tits|pussy|shit|damn|bastard|asshole|bitch|vagina|breastroot|root|admin|gamemaster|xoyo|kol/i)){
alert('error');
}
相关阅读 更多 +