I forgot.... *Feels Stupid*

liunx

Guest
I feel so stupid asking this question... I was writing out the script for a new page of mine and I completely forgot how to do this...<br />
<br />
I want a Javascript Alert to open when a user click on a link.... It is that simple...<br />
<br />
<br />
I know that you use the <a href=http://www.htmlforums.com/archive/index.php/"something">Link text</a><br />
<br />
I just forgot what goes in the Somthing place.... Can anybody help me???<br />
<br />
<br />
~Paul<!--content-->ok in your head tag you need this<br />
<br />
<script LANGUAGE="JavaScript"><br />
function MsgBox() {<br />
alert('this is an alert that you click on the link.')<br />
}<br />
</script><br />
<br />
<br />
then in the link just add<br />
<br />
<br />
onClick=MsgBox();<!--content-->
 
Back
Top