【发布时间】:2013-02-20 06:04:24
【问题描述】:
在 HTML 的同一行上使用从右到左的单选按钮时,我注意到了一个问题。正如我所料,单选“按钮”与相关文本不一致;第 1 组的收音机在第 4 组的标签旁边,但其他按钮似乎按我的预期排列。这发生在多个浏览器上。
这是预期的行为吗?语言从右到左的人会理解这个吗?
你可以在这里玩代码:http://jsfiddle.net/6U9fw/
<div dir="rtl">
<input name="group" id="group1" type="radio" value="group1" />
<label for="group1">group1</label>
<input name="group" id="group2" type="radio" value="group2" />
<label for="group2">group2</label>
<input name="group" id="group3" type="radio" value="group3" />
<label for="group3">group3</label>
<input name="group" id="group4" type="radio" value="group4" />
<label for="group4">group4</label>
</div>
<input type="button" onclick="alert($('input[type=radio]:checked').val())" value="click" />
【问题讨论】:
标签: html radio-button right-to-left bidi