首页 > HTML中布尔型属性的赋值问题

HTML中布尔型属性的赋值问题

在HTML Standard里面有这么一句话

If the attribute is present, its value must either be the empty string or a value that is an ASCII case-insensitive match for the attribute's canonical name, with no leading or trailing whitespace.

这句话的后半句是什么意思? 除了给这个属性设置空值,还有一个是什么值?


开头和结尾都没有空格不区分大小写符合属性名称规范的ASCII值


i.e. either disabled or disabled="disabled"
【热门文章】
【热门文章】