I had a given a assignment of java script as
to form a script that changes the background image of the document after equal interval of time.as i am a beginner to programming I had formed a script that should change background and a loop stated for image name to be taken from the file with common extension.In all there are 27 image which should be displayed in serial number.
but not working
here is the code
<html>
<script language="javascript">
function f1()
{
var n;
window.setTimeout("f1()",1200);
for (n=1;n<27;n++)
document.body.background=(n+".png");
}
</script>
<body>
<input type="button" onMouseover="f1()" value="Change Document Color"><p>
</body>
</html>