Mega Code Archive

 
Categories / JavaScript DHTML / Javascript Properties
 

Change text decoration in mouse outin events

<html> <head> <title>A Simple Page</title> <script language="JavaScript"> function addunderline() {     head1.style.textDecoration = "underline" } function removeunderline() {     head1.style.textDecoration = "none" } function addoverline() {     head1.style.textDecoration = "overline" } </script> </head> <body> <h1 id="head1" onMouseover="addunderline()" onMouseout="removeunderline()" onClick="addoverline()">Welcome to this page!</h1> </body> </html>