济南做网站
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" />
<title>只能输入汉字js脚本</title>
</head>

<body>
只能输入汉字:<INPUT   onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"> 
<script>
function ischinese(s){ 
var ret=true; 
for(var i=0;i<s.length;i++) 
ret=ret && (s.charCodeAt(i)>=10000); 
return ret; 
} 
</script>
</body>
</html>
posted on 2012-08-11 09:12  jkyweb  阅读(363)  评论(0编辑  收藏  举报