Answers for "form button on enter"

0

button onclick enter key

$("#id_of_textbox").keyup(function(event) {
    if (event.keyCode === 13) {
        $("#id_of_button").click();
    }
});
Posted by: Guest on June-01-2021
0

press button on enter

searchInput.onkeyup = function (e) {
    if (e.key === 'Enter') {
        searchBtn.click();
    }
}
Posted by: Guest on March-11-2021

Browse Popular Code Answers by Language