Home > Web Front-end > JS Tutorial > js compatible carriage return and mouse focus event codes for multiple browsers (IE6/7/8, firefox, chrome)_javascript skills

js compatible carriage return and mouse focus event codes for multiple browsers (IE6/7/8, firefox, chrome)_javascript skills

WBOY
Release: 2016-05-16 18:29:33
Original
910 people have browsed it

Text box:

Copy code The code is as follows:

js code:
Copy code The code is as follows:

function keydownsearch(evt)
{
evt = (evt) ? evt : ((window.event) ? window.event : "")
keyCode = evt.keyCode ? evt.keyCode : (evt.which ? evt.which : evt.charCode);
if (keyCode == 13) {
search();//Search event
}
}
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template