<tr>
<th scope="col"><font color="red">* </font>비밀번호</th>
<td>
<input type="hidden" id="PASSWORD" name="PASSWORD" value="" />
<input type="password" id="PASSWORD_CHECK" name="PASSWORD_CHECK" value="" class="input_txt" style="width:150px; ime-mode:disabled;" maxlength="20" onblur="SetImeDisable(this)" onchange="PasswordIsSame()" />
<a href="#" class="btn-pop" onclick="CheckPw(); return false;">안전성검증</a>
</td>
</tr>
<tr>
<th scope="col">비밀번호 확인</th>
<td>
<input type="password" id="PASSWORD_CHECK_IS_SAME" name="PASSWORD_CHECK_IS_SAME" value="" class="input_txt" style="width:150px; ime-mode:disabled;" maxlength="20" onchange="PasswordIsSame()"/>
<span id="same"></span>
</td>
</tr>
function PasswordIsSame() {
var passwordCheck = document.getElementsByName("PASSWORD_CHECK")[0].value;
if (passwordCheck.length < 9 || passwordCheck.length > 20) {
window.alert('비밀번호는 9글자 이상, 20글자 이하만 이용 가능합니다.');
document.getElementById('PASSWORD_CHECK').value = document.getElementById('PASSWORD_CHECK_IS_SAME').value='';
document.getElementById('same').innerHTML='';
}
if(document.getElementById('PASSWORD_CHECK').value!='' && document.getElementById('PASSWORD_CHECK_IS_SAME').value!='') {
if(document.getElementById('PASSWORD_CHECK').value==document.getElementById('PASSWORD_CHECK_IS_SAME').value) {
document.getElementById('same').innerHTML='비밀번호가 일치합니다.';
document.getElementById('same').style.color='blue';
}
else {
document.getElementById('same').innerHTML='비밀번호가 일치하지 않습니다.';
document.getElementById('same').style.color='red';
}
}
}
매번 자스 쓰는 것도 검색해서 하는것도 귀찮다...........
헝...