<script> function isChinese(temp) { var re = /[^\u4e00-\u9fa5]/; if(re.test(temp)) return false; return true; } alert(isChinese("中文")); </script>
http://www.jb51.net/article/14004.htm