Home > Article > Web Front-end > input:checkbox multi-select box achieves the same single selection effect as radio
I recently encountered a small problem, that is, sometimes when we use single-select radio, we will find that after we select one, we can no longer select none, that is, there is no cancel function after selecting. Then I thought of the powerful checkbox, but it has multiple selections. 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.
No more nonsense, direct code:
无标题文档 1 2 3 4 5 6 7
More input: checkbox multi-select box to achieve the same single-select effect as radio. For related articles, please pay attention to the PHP Chinese website!