Ex No: 17 COUNT MOVE OVER LINK
Aim: To create a HTML page to count move over link using JavaScript.
Algorithm
Step1: Create a folder “Ex17” to place the HTML file.
Step2: Create file “index.html”.
Source Code

index.html


<!DOCTYPE html>
<html>
 <head>
  <title>Count Move over Link</title> 
   <meta charset="UTF-8"> 
 </head>
 <style>
  header {
   text-align:center;
   height: 100px;
   background-color: Tan;
   padding: 10px; 
   border-radius: 10px 10px 0px 0px;
  }
  footer {
   text-align:center;
   font-size: 12px;
   height: 50px;
   line-height: 50px;
   background-color: Tan;
   padding: 10px; 
   border-radius: 10px;  
  }
  section{
   width: auto; 
   border: 2px solid gray;
   padding: 10px; 
   border-radius: 10px;
   margin:5px;
  }
  input{
   border-radius: 5px;
   margin: 5px;
  }
 </style>
 <script type="text/javascript">
   var count=0;
   function counter()
   {
    count++;
    document.getElementById("spcount").textContent= count;
   }
 </script>
 <body>  
  <header>
   <h1>Count Move over Link</h1>  
  </header>  
  <article>
    <section>  
   <a href="index.html" onMouseOver="counter()">Link to Same Page</a>
   <p>Number of Mouse over the Link is <b><span id="spcount"></span></b></p> 
    </section>
  </article>
  <footer>
   Developed by K. Anbarasan
  </footer>
 </body>
</html>
Result: Thus HTML page is created to count move over the link using JavaScript.