Home >Web Front-end >JS Tutorial >jquery multi-browser capture enter event code_jquery

jquery multi-browser capture enter event code_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 18:24:401172browse
Copy code The code is as follows:

$(document).keydown(function(event) {
if (event.keyCode == 13) {
$('form').each(function() {
//Your code to run
});
}
});

But it still doesn’t work in Opera. I’m so incompetent that I blocked the carriage return event in a fit of anger



This may not be good for some functions. But I just hope it helps some people.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn