输入必须是汉字
长沙北大青鸟作者:科泰校区匿名
摘要:<script language="JavaScript"> function check() { var str=document.form1.name.value; var s; var ts; var tscode; for (i=0;i<str.length;i++) { ts=str.substring(i); tscode=charCodeAt(ts); if ((tscode<199
<script language="JavaScript">
function check() {
var str=document.form1.name.value;
var s;
var ts;
var tscode;
for (i=0;i<str.length;i++) {
ts=str.substring(i);
tscode=charCodeAt(ts);
if ((tscode<19968)||(ts>40959)) {alert("you must input chinese");
return false;}
else {return true;}
}
}
</script>