Mega Code Archive

 
Categories / JavaScript DHTML / Event
 

Handling onClick or Links

<HTML> <HEAD> <TITLE>Handling onClick for links</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- function confirmLink() {  alert("This is the rntsoft Home Page.")  return confirm("Are you sure you want to load this document?") } //--> </SCRIPT> </HEAD> <BODY> <H1>Handling onClick for links</H1> <P><A HREF="http://www.rntsoft.com" ONCLICK="return confirmLink()"> Asks you to confirm your selection of this link.</A></P> </BODY> </HTML>