<html>
<head>
<title>Exercise</title>
<script language="javascript"><!--
function picture(num)
{
alert("You clicked on picture " + num);
}
--//></script>
</head>
<body>
<a href="javascript:picture(1)"><img src="1.gif"></a>
<a href="javascript:picture(2)"><img src="2.gif"></a>
<a href="javascript:picture(3)"><img src="3.gif"></a>
</body>
</html>
I have three pictures on the page. When one clicks on the first picture one
gets a message that one clicked on the first picture. One gets the message
that one clicked on the second picture when one clicks on the second picture
and so on. When I click on any of the pictures nothing happens. What is
wrong?
Michael_jd was formerly Michael G.H.
hi
your mistake is the end of the html-comment
--//></script>
must be
//-->