hasAttributes()
            收藏:0  
            阅读:30
        
        
        HTML DOM hasAttributes() 方法
实例
查看body元素是否有任何属性
		document.body.hasAttributes()
	
	输出结果:
		false
	
定义和用法
hasAttributes() 方法如果某节点有任何属性时返回 true,否则返回 false。
浏览器支持
	![]()
![]()
![]()
![]()
 
所有主要浏览器都支持 hasAttributes 方法
注意: Internet Explorer 8 及 IE 更早版本不支持该方法。
语法
		node.hasAttributes()
	
参数
None
返回值
| 类型 | 描述 | 
|---|---|
| Boolean | 如果节点有属性返回 true,否则返回false | 
技术细节
| DOM 版本 | Core Level 2 Node Object | 
|---|