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

Input:checkbox multi-select box achieves the same single selection effect as radio_jquery

WBOY
Release: 2016-05-16 16:44:20
Original
1139 people have browsed it

Recently I encountered a small problem, that is, sometimes when we use single-select radios, we will find that after we select one, we can no longer select none. That is, there is no cancel function after selecting. At this time, I thought of A powerful checkbox, but it is a multi-select. How can I turn it into a single selection? The effect is the same as radio. I wrote a small program myself. The code is very simple, only four lines.

Without further ado, here’s the code:

Copy the code The code is as follows:







< ;/head>



1
2
3
4
5
6
7



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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!