Script:

  1. <html>
  2. <head>
  3. <title>Click Event</title>
  4. <Script LANGUAGE=”JavaScript”>
  5. function functionc(){
  6. location=”logo.png”
  7. </script>
  8. </head>
  9. <body>
  10. Example of Click Event
  11. <p><a href=”logo.png” OneClick=”functionc()”>Show the picture</a></p>
  12. </body>
  13. </html>

Explain of Script:

  • Line number 1 is a start is a html tag.
  • Line number 2 is a start is a head tag.
  • Line number 3 is a title tag. This page title is “JavaScript”.
  • Line number 4 is a close head tag.
  • Line number 5 function declare of funcation
  • Line number 6 call new window of display logo image.
  • Line number 7 close JavaScript tag.
  • Line number 8 close head tag.
  • Line number 9 start body tag.
  • Line number 10 write message “Example of Click Event”
  • Line number 11 oneclick image link show of message “show the picture”.
  • Line number 12 close body tag.
  • Line number 13 is close html tag.

Leave a Reply

Your email address will not be published. Required fields are marked *