Node.hasAttributes
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
hasAttributes
属性返回一个布尔值true
或false
,来表明当前元素节点是否有至少一个的属性 (attribute).