HTML活动属性

时间:2015-03-22 16:06:58

标签: html

按钮具有disabled属性,这会影响其原生行为。设置active属性是否在语法上不正确?

<button active></button>

出于某种原因,我不想使用class属性。

1 个答案:

答案 0 :(得分:4)

没有&#34;活跃&#34;属性。

根据定义,未禁用的按钮是&#34;活动&#34;。

在元素上指定任意属性语法不正确,但 会产生无效文档。

如有疑问,请尝试W3C HTML5 validator

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