小编Ran*_*aps的帖子

为什么不$("#RadioButtons:checked").val()在IE中工作?

为什么不$("#RadioButtons:checked").val()- id选择器 - 在Internet Explorer中工作但是$("input:radio[name='RadioButtons']:checked").val()- 名称选择器 - 呢?

<input name="RadioButtons" id="RadioButtons" type="radio" value="1" checked>
<input name="RadioButtons" id="RadioButtons" type="radio" value="2">

<script>
  alert($("#RadioButtons:checked").val());
  alert($("input:radio[name='RadioButtons']:checked").val());
</script>
Run Code Online (Sandbox Code Playgroud)

jquery css-selectors

2
推荐指数
1
解决办法
503
查看次数

标签 统计

css-selectors ×1

jquery ×1