运行代码
(Shift+Enter)
HTML教程
奔月教程(runoon.com)
点击按钮查看按钮元件具有一个onclick属性。
点我
IE 8 及更早版本不支持 hasAttribute 方法。
运行结果