Possible Duplicate:
jQuery: make checkboxes act like radio buttons? 开发者_如何学Go
Hey All,
Im looking to make some checkboxes act like radio buttons.
For example, i have the following code:
<input type="checkbox" name="xhtml" value="B" />
<input type="checkbox" name="xhtml" value="I" />
<input type="checkbox" name="xhtml" value="A" />
The problem is that i can select all three of them, i only want to be able to select one out of the 3.
I know its easier to change to radio buttons, but i have to use checkboxes for this project.
Cheers,
Use jQuery. See: http://blog.schuager.com/2008/09/mutually-exclusive-checkboxes-with.html
精彩评论