Under Line and Overline Effect in Javascript

<html>
<head>
<script language="JavaScript">
       function addunderline() {
              head1.style.textDecoration = "underline"
       }

      function removeunderline() {
             head1.style.textDecoration = "none"
       }

      function addoverline() {
             head1.style.textDecoration = "overline"
      }

      function addlinethrough() {
             head1.style.textDecoration = "line-through"
      }
</script>
</head>
     <body>
         <h1 id="head1" onMouseover="addunderline()" onMouseout="removeunderline()"
              onClick="addoverline()" ondblclick="addlinethrough()"> Hello World </h1>
         <P> Write text here!</p>
     </body>
</html>

Comments

Popular posts from this blog

Shutdown Computer With Funny Reason

Hidden Attribute in javascript

Draw animated loading spinner canvas in Javascript