javascript Mar 30, 2020 Get the id of the button currently clicked using this.id function getid(id) { alert(id); } <input id="btn1" type="button" value="test" onclick="return getid(this.id)" />