Home > Article > Web Front-end > Input:checkbox multi-select box achieves the same single selection effect as radio_jquery
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: