search box enter key javascript

Solutions on MaxInterview for search box enter key javascript by the best coders in the world

showing results for - "search box enter key javascript"
Marcie
01 Aug 2018
1document.getElementById("id_of_textbox")
2    .addEventListener("keyup", function(event) {
3    event.preventDefault();
4    if (event.keyCode === 13) {
5        document.getElementById("id_of_button").click();
6    }
7});