K
K
kkoshakk2016-06-09 11:51:23
css
kkoshakk, 2016-06-09 11:51:23

Pressing 'Enter' on a form(input)?

It is necessary that when you press enter, the input has focus on the button, everything is clear in IE, and chrome, opera, = leave the focus in the input until the page is reloaded. How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Zhdanovskikh, 2016-06-17
@andrew72ru

$(document).on('keyup', "input[type='text']", function(event){
  if(event.keyCode === 13) { $(".mybutton").focus(); }
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question