Web page effects username, Chinese, double-byte, string containing Zhong Wenjing expression
<!doctype HTML public "-//W3C//DTD XHTML 1.0 transitional//en" "http:// Www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd "
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312"/>
<title> Web effects user name, Chinese, double-byte, string contains Zhong Wenjing expression </title>
<script language= "Web Effects"
//english;
function Isenglish (s) {
s = trim (s);
var p =/^[a-za-z]+$/;
return p.test (s);
}
//Chinese;
function Ischinese (s) {
s = trim (s);
var p =/^[u0391-uffe5]+$/;
return p.test (s);
}
//Double-byte
function Isdoublechar (s) {
var p =/^[^x00-xff]+$/;
return p.test (s);
}
//contains Chinese characters
function Haschinesechar (s) {
var p =/[^x00-xff]/;
return p.test (s);
}
</script>
<body>
<!--Here we provide several common validation functions, with user name regular expression, validation Zhong Wenjing expression, double-byte regular expression, validation string containing Zhong Wenjing expression;
</body>