<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> Javascript Animations: Demo</title> <script> var x = null; function doMove() { x.style.right = parseInt(x.style.right) + 1 + 'px'; setTimeout(doMove, 20); } function init() { x = document.getElementById('xobject'); x.style.right = '10px'; doMove(); } window.onload = init; function f1() { alert("clicked"); } function f2() { document.m1.src = "moon.jpg"; } function f3() { document.m1.src = "papy.jpg"; } </script> </head> <body> <h1> Javascript Animations: Demo</h1> <div id="xobject" style="removed:absolute"> Hello <img id="m1" name="m1" src="papy.jpg" style="margin-left:200px" onclick="f1()" onmouseover ="f2()" önmouseout ="f3()" /> </div> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)