W3School TIY
编辑您的代码:
点击按钮来获得 button 元素的 onclick 属性值。
试一下
注释:
Internet Explorer 8 以及更早的版本不支持 getNamedItem 方法。
查看结果: