<html >
<head >
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>中文js测试</title>
<script>function isChn(str){
var reg = /^[\u4E00-\u9FA5]+$/;
if(!reg.test(str)){
alert("不是中文");
return false;
}
alert("中文");
return true;
}
</script>
</head>
<body οnlοad=isChn("脚本之家")>
</body>
</html>