检测用户名只能由数字和字母组成(不支持中文、不能以数字开头)

//以字母开头,由数字和字母组成
var patn =   /^[a-zA-Z]+[a-zA-Z0-9]+$/;
if(!patn.test(username)){
alert('会员登录名只能由英文字母或数字组成(不支持中文、不能以数字开头)。');
return;
}

Popularity: 6%

No Responses to “检测用户名只能由数字和字母组成(不支持中文、不能以数字开头)”

Leave a Reply:

Name (required):
Mail (will not be published) (required):
Website:
Comment (required):
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>