如果我通过js在doc.ready之后插入一些html,那么checked=' checked‘单选按钮在Google Chrome中不会呈现为选中状态
此外,我还注意到,如果从输入中删除name属性,它就会正常工作
整个过程是这样的:
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"
type="text/javascript"></script>
</head>
<body>
<script type='text/javascript'>
$(function(){
$('body').append('<input type="radio" checked="checked" value="33" name="whatever" id="aeHobby0">');
});
</script>
</body>
</html>发布于 2011-07-26 21:52:34
这似乎是1.4.4 (live copy)中的一个错误。它在1.6.2 (live copy)中运行良好。看起来它是在1.5.2和1.6.0之间修复的(至少在我的测试中是这样),这表明它可能是由修复了8060和8500错误的补丁修复的。
https://stackoverflow.com/questions/6831011
复制相似问题