<javascript>onkeypress.. 등

HSGemini·2022년 1월 18일

onkeydown : 키를 눌렀을때 이벤트이다 (shift, alt, controll, capslock 등의 모든 키에 동작한다. 단 한영변환, 한자 등의 특수키는 인식 못한다).

onkeyup : 키를 눌렀다가 땠을 때 이벤트이다 (onkeydown 에서 인식하는 키들을 인식 한다).

onkeypress : 실제로 글자가 써질때 이벤트이다 (shift, tap, enter 등의 특수키는 인식 못한다).


https://community.wappler.io/t/having-onkeypress-return-event-keycode-13-by-default-for-server-connect-form/8835

https://stackoverflow.com/questions/2802887/preventing-form-submission-when-enter-is-pressed

onkeypress="return event.keyCode != 13;
This is to prevent default form submission on enter so that it won’t conflict with App Connect dmx-on:keypress.enter behaviour.


https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=yjhyjh5369&logNo=80110021461

onkeydown='javascript_:{ if(event.keyCode==13) event.returnValue=false;


<a href="javascript:void(0);" >

-a태그의 페이지 이동의 기능은 제거하고 a태그의 모양만을 가져가고 싶을 때 사용한다.

profile
공부중

0개의 댓글