就是html中拥有boolean值的属性,布尔值有两个值,一个是false、一个是true。
举例:
用input中的disabled属性举例
<input type = "button" value = "按钮"/>--------不写属性--值为false,按钮就可以点。
<input type = "button" value = "按钮" disabled/>---只写属性不写属性值---值为true,按钮就不能点了。
<input type = "button" value = "按钮" disabled = "disabled"/>--属性值==属性名---值为true,按钮不能点。
<input type = "button" value = "按钮" disabled = ""/>---属性值是空字符串---值还是为true,按钮不能点。
<input type = "button" value = "按钮" disabled = "任意字符"/>---属性值为任意字符-----值为true,按钮不能点。