怎么让3个radiobutton只能选中一个
<tablewidth="289"height="37"><tr><tdnowrap="nowrap"><formid="form4"name="form4"method...
<table width="289" height="37">
<tr>
<td nowrap="nowrap"><form id="form4" name="form4" method="post" action="" >
<label>
<input type="radio" name="radiobutton" value="radiobutton" />
</label>
<img src="/images/image/chs.png" width="30" height="25" />
</form>
</td>
<td nowrap="nowrap"><form id="form5" name="form5" method="post" action="">
<label>
<input type="radio" name="radiobutton" value="radiobutton" />
</label>
<img src="/images/image/cht.png" width="30" height="25" />
</form>
</td>
<td nowrap="nowrap"><form id="form6" name="form6" method="post" action="">
<label>
<input type="radio" name="radiobutton" value="radiobutton" />
</label>
<img src="/images/image/english.png" width="30" height="25" />
</form>
</td>
</tr>
</table>
这三个都能选,我要只能选其中一个 展开
<tr>
<td nowrap="nowrap"><form id="form4" name="form4" method="post" action="" >
<label>
<input type="radio" name="radiobutton" value="radiobutton" />
</label>
<img src="/images/image/chs.png" width="30" height="25" />
</form>
</td>
<td nowrap="nowrap"><form id="form5" name="form5" method="post" action="">
<label>
<input type="radio" name="radiobutton" value="radiobutton" />
</label>
<img src="/images/image/cht.png" width="30" height="25" />
</form>
</td>
<td nowrap="nowrap"><form id="form6" name="form6" method="post" action="">
<label>
<input type="radio" name="radiobutton" value="radiobutton" />
</label>
<img src="/images/image/english.png" width="30" height="25" />
</form>
</td>
</tr>
</table>
这三个都能选,我要只能选其中一个 展开
1个回答
展开全部
代码中你的3个radiobutton分别属于3个不同的form 当然就不能联合运用了。
去掉下面两个form就可以实现单选了。
<form id="form4" name="form4" method="post" action="" >
<table width="289" height="37">
<tr>
<td nowrap="nowrap">
<label>
<input type="radio" name="radiobutton" value="radiobutton" />
</label>
<img src="/images/image/chs.png" width="30" height="25" />
</td>
<td nowrap="nowrap">
<label>
<input type="radio" name="radiobutton" value="radiobutton" />
</label>
<img src="/images/image/cht.png" width="30" height="25" />
</td>
<td nowrap="nowrap">
<label>
<input type="radio" name="radiobutton" value="radiobutton" />
</label>
<img src="/images/image/english.png" width="30" height="25" />
</td>
</tr>
</table>
</form>
去掉下面两个form就可以实现单选了。
<form id="form4" name="form4" method="post" action="" >
<table width="289" height="37">
<tr>
<td nowrap="nowrap">
<label>
<input type="radio" name="radiobutton" value="radiobutton" />
</label>
<img src="/images/image/chs.png" width="30" height="25" />
</td>
<td nowrap="nowrap">
<label>
<input type="radio" name="radiobutton" value="radiobutton" />
</label>
<img src="/images/image/cht.png" width="30" height="25" />
</td>
<td nowrap="nowrap">
<label>
<input type="radio" name="radiobutton" value="radiobutton" />
</label>
<img src="/images/image/english.png" width="30" height="25" />
</td>
</tr>
</table>
</form>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询