Home > Web Front-end > JS Tutorial > body text

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

WBOY
Release: 2016-05-16 17:12:29
Original
1063 people have browsed it

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:





Related labels:
ff ie
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