<script language = "javascript"> function test() { alert("test") } </script> <a href = "#" onClick = "test()">Test</a>