日期:2014-05-18  浏览次数:20626 次

为什么单选钮能全部选上!!!
代码:
<table>
<input type="radio" value="" name="good"/>很好
<input type="radio" value="" name="common"/>一般
<input type="radio" value="" name="shit"/>无所谓
<input type="radio" value="" name="bad"/>不好
<input type="button" value="投票" onclick="alert('暂时不能投票,请原谅!')"/>
<input type="button" value="查看"/> 
</table>

问题:当我用鼠标点击的时候,所有的按钮都能同时选上,为什么呀?

------解决方案--------------------
把name属性设置成相同就只能选一个了..