how to execute javascript inside href code example Example: how to make a html link execute a javascript function <a href="javascript:alert('Hello!');">Clicky</a>