Home  >  Article  >  Web Front-end  >  Js event compatibility issues in IE and FF_javascript skills

Js event compatibility issues in IE and FF_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:12:30885browse

1. window.event

IE: There is a window.event object
FF: There is no window.event object. Event objects can be passed as arguments to functions.
For example:

Copy code The code is as follows:

function showDiv(event)
{
var event=window.event||event;
event.clientX;
event.clientY;
}
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