判断输入框中是不是包含中文

判断输入框中是否包含中文

<%@ page language="java" contentType="text/html"
    pageEncoding="utf-8"%>
<html>
<head>
<title>Insert title here</title>
</head>
<body>
<script language="javascript"> 
function funcChina(){

var obj = document.form1.txtName.value;
if(/.*[\u4e00-\u9fa5]+.*$/.test(obj))
{
alert("含有中文!");
return false;
}
alert("没有中文!");
return true;
}
</script>
<form name="form1">
<input type="text" name="txtName">
<input type="button" name="butTxt" value="开始判断" onclick="funcChina()">
</form>
</body>
</html>