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

jQuery implements arbitrarily changing the name and value of any attribute of a div (partial native js implementation)_javascript skills

WBOY
Release: 2016-05-16 17:32:59
Original
1031 people have browsed it

Some simple examples use native js and jQuery to change div attributes and reset them at will. The code is as follows:

Copy code The code is as follows:





Function passes parameters to change the value of any attribute of Div











Enter "attribute name" and "attribute value" in the upper input box, and click the OK button to view the effect.



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