![](/img/trans.png)
[英]Checkbox still checked hitting the back button, but it has no "checked" attribute
[英]I have set the html checkbox the checked property to false,but it still checked
这是我的html标记:
<input type="checkbox" checked="false">
我已将checked
设置为false,但仍会检查结果
为什么会这样? 如果我删除checked属性,它将取消选中。
实际上我想在动态的html标记中插入一个input[type=checkbox]
,用参数来确定是否选中
如果指定选中,则检查它; 如果你说checked =“false”,checked =“true”,checked =“checked”或者只是简单检查就没关系。
如果您不想检查它,则不要包括checked属性。
<input type="checkbox" />
请参阅: http : //www.w3schools.com/tags/tryit.asp?filename = tryhtml_input_checked
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.