Home > Web Front-end > JS Tutorial > Use JavaScript to dynamically set styles to implement code (2)_javascript skills

Use JavaScript to dynamically set styles to implement code (2)_javascript skills

WBOY
Release: 2016-05-16 17:42:54
Original
1155 people have browsed it

You can refer to the previous version http://www.jb51.net/article/33555.htm The disadvantage of this is that if you want to change the style, you may have to use search and replace.

Therefore, Insus.NET wrote another method to implement it, so that the application can be changed.
First write a style Style:

Copy the code The code is as follows:



Javascript also needs to be changed:
Copy code The code is as follows:



Finally is the dynamic application of html.
Copy code The code is as follows:

onmouseover="onOver(this)" onmouseout="onOut(this)">
ERP http://xxx.xxx.com/erp

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