运行代码
(Shift+Enter)
HTML教程
奔月教程(runoon.com)
单击按钮,查看body元素是否有任何属性
点我
尝试添加一个属性到body元素,结果将返回
true
代替
false
.
注意:
IE 8和更早的版本不支持hasAttributes 方法。
运行结果