6
如何获取选中使用jQuery的RadioButton索引?我需要阅读并保存到饼干以后使用的代码加载状态jQuery RadioButton索引
$('input[name="compression"]')[{Reading from cookies code}].checked = true;
1<input name="compression" type="radio" value="1" checked="checked" />
2<input name="compression" type="radio" value="2" />
3<input name="compression" type="radio" value="3" />
问候 托马斯
奇怪的东西,它的工作原理上的“压缩”单选按钮精上面列出了哪些代码,但是在下面的代码中,“porient”单选按钮会返回错误的索引。如果选择第一个单选按钮,则返回0(ok),然后返回2(!!!!)无法理解发生了什么。有任何想法吗?
<输入名称= “porient” 类型= “无线电” 的值= “纵向” 检查= “检查”/>肖像
– Tomas 2010-03-19 08:30:06<输入名称= “porient” 类型= “无线电” 的值= “风景”/ >风景
查看扩展的答案 – jitter 2010-03-19 08:40:44