songskysun avatar

엔터키 입력시 함수 호출 또는 submit 하기 (제이쿼리)

songskysun

Published: 28 Feb 2018 › Updated: 28 Feb 2018엔터키 입력시 함수 호출 또는 submit 하기 (제이쿼리)

엔터키 입력시 함수 호출 또는 submit 하기 (제이쿼리)

<스크립트>

$(".search_input").keypress(function(e) {

if (e.keyCode == 13){ // search_input 이라는 클래스의 객체에서 13번키 (엔터)가 입력되면 
    action();                      //action 함수를 호출한다.

}    

});

</스크립트>

Leave 엔터키 입력시 함수 호출 또는 submit 하기 (제이쿼리) to:

Written by

Read more #javascript posts


Best Posts From songskysun

We have not curated any of songskysun's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From songskysun