Use the name attribute of html to get the dom element
Sep 18, 2017 am 10:53 AMIn the past, obtaining dom elements was basically done through js's document.getElementById() or document.getElementByName or other methods or through jQ's selector. However, in fact, the name attribute of html can also be used to directly obtain dom elements. The code is as follows Shown:
1 2 3 4 5 6 7 8 9 10 |
|
Pressing the button key will cause the checkbox named sel in the form to be selected.
The above is the detailed content of Use the name attribute of html to get the dom element. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

How do you parse and process HTML/XML in PHP?
