Home  >  Article  >  Web Front-end  >  Input:checkbox multi-select box achieves the same single selection effect as radio_jquery

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

WBOY
WBOYOriginal
2016-05-16 16:44:201139browse

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



Statement:
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