0
주어진 코드에서 best.test(password)
이 true를 반환하지만 if() 에서 이것을 사용하면 false로 간주됩니다.정규 표현식을 사용하면 .test() 함수와 if 및 else가 충돌합니다.
코드 :
if(best.test(password)) //It takes it as a false .
{
document.write(best.test(password));
tdPwdStrength.innerHTML="best"+best.test(password); //but in actual it is true and returning true.
}
이 제안하십시오!
'test()'에 대한 코드를 추가해야합니다. –
정규 표현식이 가장 좋으면 No입니다. – Victor