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>
<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
Post a Comment