Změna obrázku při najetí myši -
zdrojový kód
<html>
<head>
<title>Java Script ze stránky - www.jaknaweb.com</title>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
</head>
<body>
<SCRIPT language=JavaScript>
<!--
var id, op = 100, step = -10;
function Start()
{
id = window.setInterval("Move()", 50);
}
function Stop()
{
window.clearInterval(id);
}
function Move()
{
op += step;
if (op < 0) {
op = 0;
step = -step;
};
if (op > 100) {
op = 100;
step = -step;
};
document.all.img1.filters.Alpha.opacity = op;
document.all.img2.filters.Alpha.opacity = 100-op;
}
// -->
</SCRIPT>
<BODY>
<IMG id=img1 onmouseout=Stop() onmouseover=Start()
src="tiger1.gif"
style="FILTER: Alpha(Opacity=100); LEFT: 10px; POSITION: absolute; TOP: 10px; Z-INDEX: 2" width="320" height="200">
<IMG id=img2 src="tiger2.gif"
style="FILTER: Alpha(Opacity=0); LEFT: 10px; POSITION: absolute; TOP: 10px; Z-INDEX: 1" width="320" height="200">
<center>
</BODY></HTML>