我有以下表格代码,但我不能在IE中选择卖出收音机,我可以在谷歌浏览器中同时选择两个收音机.
<form method="post" action="dothemath.php" style="width: 403px" class="style1">
<input type="radio" id="rdobuy" style="width: 20px; height: 21px;" checked="checked"/>
<label>Buy</label>
<input type="radio" id="rdosell" style="width: 20px; height: 21px;"/>
<label >Sell</label>
</form>
Run Code Online (Sandbox Code Playgroud)
有什么我想念的东西......?
Que*_*tin 13
您的单选按钮没有name属性.他们需要它们有两个原因.
您还需要value说明提交的数据.
顺便说一句,你的<label>s无用,因为它们与任何控件无关.它们需要一个for与id它们要关联的控件具有相同值的属性.
<form method="post" action="dothemath.php">
<input type="radio" id="rdobuy" name="foo" value="buy" checked="checked"/>
<label for="rdobuy">Buy</label>
<input type="radio" name="foo" value="sell" id="rdosell" />
<label for="rdosell">Sell</label>
</form>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
14845 次 |
| 最近记录: |