Two Buttons calling same js function.how will know in js function."which button is calling.?"

button_click.zip (15.4 KB)

console.log(element.id)
alert(element.id)

var textArea = hypeDocument.getElementById('text');
textArea.innerHTML = element.id;

element.id
You get the picture :smile:

Thank You…DBear :grinning: :grinning:
Now its working fine…
One quick question…
how to add tag in button from identity inspector and how to get tag from button in js,When click on button…

Can you explain what you mean by “tag”?

You assign the button a unique ID here:

… and in your function, you can grab that ID from the event or the clicked element:
var theButtonId = event.target.id;
or
var theButtonId = element.id;

@proberts first problem has been answered and poster knows how to assign an id as he has in his example… Nice pic though :wink:

@vikrantarya any more on what you are referring to when you mean tag?

@DBear Thank You,That problem was resolved.
@proberts Thank You