Home  >  Article  >  Web Front-end  >  Introduction to the use of event events under ie and ff_javascript skills

Introduction to the use of event events under ie and ff_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:12:291023browse

Event is an object that comes with IE, but this object does not exist in FF. Events can only be simulated by passing parameters

In addition, srcElement is used in IE to obtain the event trigger source, and target is used in FF. Therefore, relevant browser compatibility needs to be made when using these two objects.

Copy code The code is as follows:

.org/1999/xhtml">


< title>srcElement --http://www.jb51.net/








View the running results
Synthesize attachEvent and addEventListener in the previous section.

Copy code The code is as follows:





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