[求助]关于检测用户是否文明发言
我打算用js在前台检测用户是否文明发言,函数如下:<script language=javascript>
function check(str){
var para=str.value;
bads=["日","操","性交","口交","乳房","乳头","阴蒂","阴毛","主机托管"]
for(i=0;i<=bads.length;i++){
a=para.IndexOf(bads(i))
if(a!=0){
alert("请文明留言!")
}
}
}
</script>
<textarea name=con onBlur="check(this)"></textarea>
调试后浏览器报错缺少函数,搞不明白了,恳请大家帮我找错误!谢谢!