Change text decoration in mouse out/in events : textDecoration « Javascript Properties « JavaScript DHTML






Change text decoration in mouse out/in 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>

   
  








Related examples in the same category