Home > Web Front-end > JS Tutorial > js method to determine whether checkbox is selected_Basic knowledge

js method to determine whether checkbox is selected_Basic knowledge

WBOY
Release: 2016-05-16 17:48:23
Original
1315 people have browsed it

Core tip: On many occasions, you may encounter the problem of determining whether an element on the page is selected. The following is a method of using js to determine whether a CheckBox is selected.
//No number selected

Copy code The code is as follows:

< input type="checkbox" name="checkbox1" checked>







//No one selected
Copy code The code is as follows:








//No number selected
Copy code The code is as follows:









//No one selected
Copy code The code is as follows:



< input type="checkbox" name="test">




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