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

JavaScript uses Dom to change the value of the text box in front of the hyperlink_javascript skills

WBOY
Release: 2016-05-16 19:09:35
Original
1187 people have browsed it

Using the DOM tree, you can modify related content without using the ID, such as modifying the value of the text box in front of each hyperlink.


[Ctrl A Select all Note: If you need to introduce external Js, you need to refresh to execute ]

Here we mainly use the previousSibling attribute to access The previous node, thereby achieving the effect of changing the value of the previous text box.
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