<html>
<body><script>if('×ß'.charCodeAt(0) >=128) alert('ÊäÈëµÄÊǺº×Ö')</script>
</body>
</html>
<body><script>if('×ß'.charCodeAt(0) >=128) alert('ÊäÈëµÄÊǺº×Ö')</script>
</body>
</html>
<body><script>if('走'.charCodeAt(0) >=128) alert('输入的是汉字')</script>
</body>
</html>
function dd(s){
if (/[^\x00-\xff]/g.test(s.value))
{
alert("不能含有汉字");
s.value="";
}
}
</script>
<input type="text" onblur="dd(this)">