Answers for "onclick a hyperlink and display the id of clicked hyperlink js"

0

onclick a hyperlink and display the id of clicked hyperlink js

<a href="" type="button" onclick="myFunction(this.id)" id="One">Click</a>

<script>
  function myFunction(a){
		alert(a);
	}
</script>
Posted by: Guest on April-28-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language