js如何获得button元素onclick执行的函数名
1、新建一个html文件,命名为test.html,用于讲解js如何获得button元素onclick执行的函数名。

3、在script标签内,通过getElementsByTagName方法获得button元素对象。

5、在script标签内,使用alert输出函数名。

1、新建一个html文件,命名为test.html,用于讲解js如何获得button元素onclick执行的函数名。
3、在script标签内,通过getElementsByTagName方法获得button元素对象。
5、在script标签内,使用alert输出函数名。