<html>
<head>
<title>Animation in JavaScript</title>
<script type="text/javascript">
<!--
var imgObject = null;
function init() {
imgObject = document.getElementById('Image');
imgObject.style.position = 'relative';
imgObject.style.left = '0px';
}
function moveinRight() {
imgObject.style.left = parseInt(imgObject.style.left) + 10 + 'px';
}
window.onload = init;
//-->
</script>
</head>
<body>
<form>
<img id="Image" src="file:///D:/Images/Winter.jpg" height="30%" width="30%"></img>
<p>
Click button below to move the image to right</p>
<input type="button" value="Click" onclick="moveinRight();" />
</form>
</body>
</html>