先看看没有互斥的情况:

<html>
<body>

男性:<input type="radio" id="male" />
<br />
女性:<input type="radio" id="female" />
<br />

</body>
</html>

        要实现互斥, 可以让名称一致, 比如:

<html>
<body>

男性:<input type="radio" id="male"  name="xxx"/>
<br />
女性:<input type="radio" id="female" name="xxx"/>
<br />

</body>
</html>

       OK, 最后强调一下,  radio也只是input标签的type属性而已。

       input, 你好强大!





本文转载:CSDN博客