听起来有点愚蠢,但是我想知道在HTML中陈述复选框已选/未选的最佳方式。
我看到过很多不同的例子:
<input type="checkbox" checked="checked" />
<input type="checkbox" />
<input type="checkbox" checked="yes" />
<input type="checkbox" checked="no" />
<input type="checkbox" checked="true" />
<input type="checkbox" checked="false" />
哪些浏览器适用于这些浏览器中的哪些浏览器,最重要的是,jQuery是否能够找出所有3个框中选中的框?
编辑: W3C规范似乎暗示仅存在checked属性是正确的。这是否意味着checked =“false”和checked =“no”仍将选中框?