How can you make an html link that executes a javascript injection?

If it’s possible?

You use the "<a href=…" tag in html to link to a website.
You can type into the url bar something like "javascript:alert(‘Hello!’);" to do a javascript injection.

How would you make a link in a web page that when you click on it, it does the javascript command?
Effectively <a href="javascript…">, except that obviously doesn’t work.

Thanks!

<a href="javascript:void(0)" onClick="Javascript:alert( ‘Hello!’ );">Text</a>

Technorati Tags: , , , , , , , , , , , ,