可能重复:
Change Password Control RegEx validating oddly in IE 7 only
我正在使用我从网站上获取的这个表达式来验证密码。它在FF和IE9中工作正常,但在IE7中将pw标记为不正确。
var pwval = /^(?=.*[A-Za-z])(?=.*[0-9])(?!.*[^A-Za-z0-9])(?!.*\s).{6,8}$/;
if (!pwval.test(mu.pw.value)) {
alert('Your password must satisfy the following. \n\n* Password should be 6 to 8 character long. \n* Password should have at least one alphabet. \n* Password should have at least one numeric value. \n* Password should not have special characters.');
}
任何想法?
约翰