<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:///TR/xhtml1/DTD/">
<html xmlns="http:///1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>js determines whether characters are Chinese characters</title>
<style type="text/css">
.content{
width:350px;
overflow:hidden;
border:1px solid #ddd;
}
</style>
<script language="javascript" type="text/javascript">
function CheckChinese(obj,val){
var reg = new RegExp("[\\u4E00-\\u9FFF]+","g");
if((val)){
alert("You cannot enter Chinese characters!");
var strObj = (obj);
= "";
();
}
}
</script>
</head>
<body>
<div class="content">
<div>Test character: <input type="text" onblur="CheckChinese('test',)" /> </div>
</div>
</body>
</html>