抄别人写的:<script>
function check(str){
if(str.match(/[^一-龥]/))alert("有");else alert("无");
}
</script>
<input id=t value=中文Abc><input type=button value=检验是否有非汉字 onclick=check(t.value)>
function check(str){
if(str.match(/[^一-龥]/))alert("有");else alert("无");
}
</script>
<input id=t value=中文Abc><input type=button value=检验是否有非汉字 onclick=check(t.value)>
function check(value){
if(/[\u4E00-\u9FA5]/g.test(value)){
alert("包含中文字符");
}
if(/[0-9]/g.test(value)){
alert("包含数字");
}
}
</script>