Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

search box enter key javascript

document.getElementById("id_of_textbox")
    .addEventListener("keyup", function(event) {
    event.preventDefault();
    if (event.keyCode === 13) {
        document.getElementById("id_of_button").click();
    }
});
 
PREVIOUS NEXT
Tagged: #search #box #enter #key #javascript
ADD COMMENT
Topic
Name
1+5 =