按钮有一个 disabled影响其本机行为属性。设置active属性是否在 html 语法上不正确?
<button active></button>
Run Code Online (Sandbox Code Playgroud)
出于某种原因,我不想使用该class属性。
没有“活动”属性。
根据定义,未被禁用的按钮是“活动的”。
在元素上指定任意属性在语法上并不错误,但它会产生无效文档。
如有疑问,请尝试W3C HTML5 验证器。
Attribute active not allowed on element button at this point:
<button active></button>
Attributes for element button:
Global attributes
autofocus
disabled
form
formaction
formenctype
formmethod
formnovalidate
formtarget
menu
name
type
value
Run Code Online (Sandbox Code Playgroud)