Get value of the clicked button
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Get value of the clicked button:
You need to use
this
variable in order to access the clicked button’s value.This would return the
value
of the button.Plain JavaScript solution with ES6 syntax: