开发者

Checkbox behaving as radiobox [duplicate]

This question already has answers here: Closed 12 years ago.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜