Professional Documents
Culture Documents
Making Disjoint Rollover
Making Disjoint Rollover
Making Disjoint Rollover
Example:
<!DOCTYPE html>
<html>
<head>
<title> Disjoint Rollover </title>
<script type="text/javascript" language="javascript">
function f1()
{
document.getElementById('s1').src="img1.jpg";
}
function f2()
{
document.getElementById('s1').src="img2.jpg";
}
function f3()
{
document.getElementById('s1').src="img3.jpg";
}
function f4()
{
document.getElementById('s1').src="img4.jpg";
}
function f5()
{
document.getElementById('s1').src="img.jpg";
}
</script>
</head>
<body>
<table>
<tr>
<td colspan="4" align="center"><img src="img.jpg" id="s1" width="200px"
height="200px"></td>
</tr>
<tr>
<td><img src="img1.jpg" width="200px" height="200px" onmouseover="f1()"
onmouseout="f5()"></td>
<td><img src="img2.jpg" width="200px" height="200px" onmouseover="f2()"
onmouseout="f5()"></td>
<td><img src="img3.jpg" width="200px" height="200px" onmouseover="f3()"
onmouseout="f5()"></td>
<td><img src="img4.jpg" width="200px" height="200px" onmouseover="f4()"
onmouseout="f5()"></td>
</tr>
</table>
</body>
</html>
Output:
Default Image