<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>验证字符串中包含有效字符</title>

</head>
<body>

<form action="-" method="post" OnSubmit="return checkdata()">
<p>请输入一非空字符串:<input type="text" name="num" OnkeyUp='value=value.replace(/[^\u4E00-\u9FA5]/, "")' OnKeyDown='value=value.replace(/[^\u4E00-\u9FA5]/, "")'>
<p><input type="submit" value="检查并提交">
<form>
</body>
</html>