Answers for "how to use javascript function on html links"

0

how to make a html link execute a javascript function

<a href="javascript:alert('Hello!');">Clicky</a>
<!--or-->
<button onclick="alert("Hello")">Click Me!</button>
Posted by: Guest on March-06-2021

Browse Popular Code Answers by Language