• 0

I dont understand this code


Question

<script language=?JavaScript?>

function linkSomePage_onclick()

{

alert(?You Clicked??);

return true;

}

</script>

<A href=?somepage.htm? name=?linkSomePage?

onclick=?return linkSomePage_onclick()?>

 

I dont understand how the return statement or whatever its called works here

 

you click on the link the Linksomepage function is called where does the return statement or whatever its called come into this

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

If you return false the browser will stop the propagation of the event. So the link would not be followed.

 

However that mechanism is outdated.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.