javascript - JQuery 单选按钮在 IE6 中未被选中

标签 javascript jquery internet-explorer-6

我有以下代码

<input type="radio" name="HotelSearch_Measure" value="Miles">
<input type="radio" name="HotelSearch_Measure" value="KM">

但是,当我使用以下内容时,它可以在 IE9/Chrome/Firefox 中运行,但不能在 IE6 中运行

jQuery("input[value='Miles'").attr("checked", true);

我尝试过搜索,但没有成功。

提前致谢。

最佳答案

我相信这适用于 IE6 和其他浏览器

jQuery("input[value='Miles']").attr("checked", "checked");

关于javascript - JQuery 单选按钮在 IE6 中未被选中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6033031/

相关文章:

javascript - 使用 JQuery 的图像 slider 不显示我选择的下一张图像,而是从头开始显示

php - 根据选择的运输有条件地隐藏 WooCommerce 中的“结账”字段

javascript - 将文本替换为 html。 jQuery

html - 基于表格的布局中 div 右对齐的问题

javascript - CSS 不适用于 IE 7 中动态创建的元素?

javascript - YouTube将http重定向到https并使用Flash Player代替HTML5

javascript - 如何在@click 上更新模板

javascript - 如何将这个 moment.js 代码从 node.js 运行到 angular.js Controller ?

javascript - 从原型(prototype)更改/包装函数

javascript - IE设置document.domain后读取window.location(6)