Home >Web Front-end >JS Tutorial >How to use attachEvent and pass parameters [IE|firefox]_javascript skills

How to use attachEvent and pass parameters [IE|firefox]_javascript skills

WBOY
WBOYOriginal
2016-05-16 19:13:181067browse

A better solution can be to use scope. Compare the value of the following variable str within the scope and outside the scope

Copy code The code is as follows:





Effect 2




[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh to execute ]If you are upstairs Without comparing values ​​inside and outside the scope, can it be simplified to:




[Ctrl A select all Note: If you need to introduce external Js, you need to refresh to execute ]
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