JavaScript - 주민번호 체크
출처 : http://blog.naver.com/mini0076/130003885121
http://cafe.chosun.com/club.menu.bbs.read.screen?page_num=1&p_club_id=itmania&p_menu_id=9&message_id=488185
1. 정보 입력시 자동으로 입력폼 이동하기
<html>
<head>
<script language="javascript">
<!--
function check()
{
var str = document.jumin.jumin1.value.length;
if(str == 6)
document.jumin.jumin2.focus();
}
-->
</script>
</head>
<body>
<form name="jumin">
<h2>주민등록 입력</h2>
<input type="text" name="jumin1" size="6" Maxlength="6" OnKeyPress="check();" class="inputtext"> -
<input type="text" name="jumin2" size="7" Maxlength="7" class="inputtext">
</body>
</html>
2. Button을 이용하여 웹페이지 이동
<script language="javascript">
<!--
function popup_new(is_insert, pid)
{
var str;
str="master_editing_pop_set.jsp?is_insert="+is_insert+"&pid=" +pid ;
document.location.href = str;
//window.open(str,'팝업설정','width=800,height=480 scrollbars=1');
}
-->
</script>
<tr>
<td height="40" align="center"><label>
<input type="button" onclick="popup_new('Y', '');" value="팝업설정" />
</label></td>
</tr>
- end -