javascript - checked="checked" not rendering as checked radio button in Chrome - Stack Overflow

If I insert some html via js after the doc.ready than checked='checked' radio button doesn�

If I insert some html via js after the doc.ready than checked='checked' radio button doesn't render as checked in Google Chrome

also, I noticed that if I remove the name attribute from the input than it works

here is the whole thing:

<html>
<head>
<script src=".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>

If I insert some html via js after the doc.ready than checked='checked' radio button doesn't render as checked in Google Chrome

also, I noticed that if I remove the name attribute from the input than it works

here is the whole thing:

<html>
<head>
<script src="http://ajax.googleapis./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>
Share Improve this question edited May 10, 2018 at 14:01 Josh Lee 178k39 gold badges277 silver badges281 bronze badges asked Jul 26, 2011 at 13:48 OmuOmu 71.3k93 gold badges284 silver badges413 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

It would appear to be a bug in 1.4.4 (live copy). It works fine in 1.6.2 (live copy). Looks like it was fixed between 1.5.2 and 1.6.0 (at least in my tests), which suggests it was probably fixed by the patch that fixed bugs 8060 and 8500.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745378200a4625099.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信