17
rated 0 times
[
23]
[
6]
/ answers: 1 / hits: 17548
/ 8 Years ago, tue, october 25, 2016, 12:00:00
I have a button with a onclick attribute which is pointing to the function test()
.
<button onclick=test()>Button 1</button>
<button onclick=test()>Button 2</button>
<button onclick=test()>Button 3</button>
Function test():
function test()
{
var button_name = this.html;
console.log(Im button + button_name);
}
How can I get informations about the clicked button?
e.g. How can i read the html?
jsfiddle: https://jsfiddle.net/c2sc9j9e/
More From » jquery