자동으로 포커스 이동하는 스크립트
페이지 정보
작성자 오원장쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 댓글 0건 조회 8,154회 작성일 10-08-28 17:38본문
<script type="text/javascript">
//maxlength 만큼 옮기면 다음으로 이동하기....
function nextFocus(sFormName,sNow,sNext)
{
var sForm = 'document.'+ sFormName +'.'
var oNow = eval(sForm + sNow); if (typeof oNow == 'object')
{
if ( oNow.value.length == oNow.maxLength)
{
var oNext = eval(sForm + sNext); if ((typeof oNext) == 'object')
oNext.focus();
}
}
}
</script>
//maxlength 만큼 옮기면 다음으로 이동하기....
function nextFocus(sFormName,sNow,sNext)
{
var sForm = 'document.'+ sFormName +'.'
var oNow = eval(sForm + sNow); if (typeof oNow == 'object')
{
if ( oNow.value.length == oNow.maxLength)
{
var oNext = eval(sForm + sNext); if ((typeof oNext) == 'object')
oNext.focus();
}
}
}
</script>
<form>
<table>
<tr bgcolor="#ffffff">
<td width="160" class=m_title><label for="reg_mb_name">이름</label></td>
<td class=m_padding>
<input name=mb_name id=reg_mb_name itemname="이름" required value="<?=$member[mb_name]?>" <?=$member[mb_name]?"readonly class=ed2":"class=ed";?>>
<?
if ($w=='') {
echo "※ 반드시 실명을 입력하세요.";
}
?>
</td>
</tr>
<tr bgcolor="#ffffff">
<td class=m_title1><label for="mb_jumin">주민등록번호</label></td>
<td class=m_padding width="130">
<input name="mb_jumin1" id="reg_mb_jumin1" type="text" maxlength=6 class="ed" size=6 onkeyup="nextFocus('fregisterform','reg_mb_jumin1','reg_mb_jumin2')" title="주민등록 번호 앞자리"> - <input name="mb_jumin2" id="reg_mb_jumin2" type="text" maxlength=7 class="ed" size=7 onkeyup="nextFocus('fregisterform','reg_mb_jumin2','reg_mb_name')" title="주민등록 번호 뒷자리">
</td>
<td>
<a href="#real_check" onclick="reg_mb_real_check();return false;"><img src="<?=$member_skin_path?>/img/btn_real.gif" border=0 align=absmiddle alt="실명인증"></a><span id='msg_mb_real'></span>
</td>
</tr>
</table>
</form>
<table>
<tr bgcolor="#ffffff">
<td width="160" class=m_title><label for="reg_mb_name">이름</label></td>
<td class=m_padding>
<input name=mb_name id=reg_mb_name itemname="이름" required value="<?=$member[mb_name]?>" <?=$member[mb_name]?"readonly class=ed2":"class=ed";?>>
<?
if ($w=='') {
echo "※ 반드시 실명을 입력하세요.";
}
?>
</td>
</tr>
<tr bgcolor="#ffffff">
<td class=m_title1><label for="mb_jumin">주민등록번호</label></td>
<td class=m_padding width="130">
<input name="mb_jumin1" id="reg_mb_jumin1" type="text" maxlength=6 class="ed" size=6 onkeyup="nextFocus('fregisterform','reg_mb_jumin1','reg_mb_jumin2')" title="주민등록 번호 앞자리"> - <input name="mb_jumin2" id="reg_mb_jumin2" type="text" maxlength=7 class="ed" size=7 onkeyup="nextFocus('fregisterform','reg_mb_jumin2','reg_mb_name')" title="주민등록 번호 뒷자리">
</td>
<td>
<a href="#real_check" onclick="reg_mb_real_check();return false;"><img src="<?=$member_skin_path?>/img/btn_real.gif" border=0 align=absmiddle alt="실명인증"></a><span id='msg_mb_real'></span>
</td>
</tr>
</table>
</form>
댓글목록
등록된 댓글이 없습니다.