Forum : How to have an element invoke a javascript on selection, instead of going to a new URL:
Brief description  about Online courses   join in Online courses
View Balu  Prasad 's Profile

How to have an element invoke a javascript on selection, instead of going to a new URL:

how to have an element invoke a javascript on selection, instead of going to a new URL??
Asked by Balu Prasad | Mar 22, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Balu,
<script type="text/javascript">
function pseudoHitMe() {
alert("Ouch!");
}
</script>
<a href="javascript:pseudoHitMe()">hit me</a>
Mar 22, 2010