<input type="checkBox" checked="checked" />
和
selected="selected"
但是,大多数浏览器会接受它,你只需要写“CHECKED”并且不给它一个值.那么,如果你确实包含了属性,那么是否有任何值(一致地)被认为是假的?
解决方法 没有值会导致取消选中复选框.如果checked属性存在,则无论您将其设置为什么值,都将选中该复选框.<input type="checkBox" checked /><input type="checkBox" checked="" /><input type="checkBox" checked="checked" /><input type="checkBox" checked="unchecked" /><input type="checkBox" checked="true" /><input type="checkBox" checked="false" /><input type="checkBox" checked="on" /><input type="checkBox" checked="off" /><input type="checkBox" checked="1" /><input type="checkBox" checked="0" /><input type="checkBox" checked="yes" /><input type="checkBox" checked="no" /><input type="checkBox" checked="y" /><input type="checkBox" checked="n" />
渲染所有现代浏览器(FF3.6,Chrome 10,ie8)中检查的所有内容.
总结以上是内存溢出为你收集整理的html – 检查和选中的值是假的?全部内容,希望文章能够帮你解决html – 检查和选中的值是假的?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)