/*用户名称格式判断——用户名只能为下划线、数字、字母或中文长度不超过10个字符*/function checkUserName(str) {var reg = /^[_0-9a-zA-Zu4e00-u9fa5]{1,10}$/;return reg.test(str);}