dom如何使用hasAttributes判断具有任何属性
1、创建一个名称为hasAttributes 的html文件 ,并在body中加入一个onclick属性

3、添加一p标签,设置id 为 showhattributes

5、在自定义函数中获取对象,在用hasAttributes方法来判断该body对象中是否拥任何属性,将结果显示到p标签中

1、创建一个名称为hasAttributes 的html文件 ,并在body中加入一个onclick属性
3、添加一p标签,设置id 为 showhattributes
5、在自定义函数中获取对象,在用hasAttributes方法来判断该body对象中是否拥任何属性,将结果显示到p标签中