티스토리 뷰
//enter event
var exp = "";
function keyEvent(e){ //window.event
if(exp != "ok"){
if ( event.keyCode == 13 ){ //ENTER KEY CODE
formCheck();
}
} else{
exp = "";
}
}
document.onkeypress = keyEvent;
---------------------------------------------------------------------------------------------------------------------------
// HTML
< SCRIPT language="javascript" type="text/javascript" src="/login@admin/_js/keyEvent.js" />
< !-- KeyEvent START -->
< input name="txtPass" type="password" id="pw" size="24" onKeyPress="keyEvent(event);" />
< !-- KeyEvent END -->
---------------------------------------------------------------------------------------------------------------------------
'Language > JavaScript_JS' 카테고리의 다른 글
[ JavaScript ][ JS ] pageNevi(nowPage, totalNum, pLimit, bLimit); (0) | 2015.11.29 |
---|---|
[ JavaScript ][ JS ] 도메인, 현재페이지 경로 구하기 / domain URL location href (0) | 2015.11.29 |
[ JavaScript ][ JS ] mTree (0) | 2015.11.29 |
[ JavaScript_JS ] marquee - text 문자 롤링 (0) | 2015.11.29 |
[ JavaScript_JS ] 단축키 지정 - Shortcuts (0) | 2015.11.29 |