I have a button with a onclick attribute which is pointing to the function test().
test()
Button 1 <
function test(button) { var button_name = button.getAttribute('name'); console.log("Im button "+ button_name); }
Button 1 Button 2 Button 3