bukoen
11-29-2005, 08:53 AM
I'm a biginner, and I can't understand the following script:
there are 1 line written on the screen from the script, then when the function orra is 'activated ' this line dissapears and the other 2 lines appears.
I wanted to not dissapear the first line, and I want in this way (with a function + other lines from outside the function)
What I'm missing ?( the browser is Explorer)
<html>
<body id='ez' >
<SCRIPT LANGUAGE="JavaScript">
var orak= new Array(16)
for (i=0;i<11;i++)
{
orak[i]=i
}
function orra() {
yy=0
xx=0
document.write('<div id="masik" style="position:absolute;top:'+yy+'px;left:'+xx+';px;height:10px;width:10px">'+orak[10]+'</div>')
document.write('<div id="masik" style="position:absolute;top:50px;left50;px;height:10px;width:10px">'+orak[9]+'</div>')
}
document.write('<div id="masik" style="position:absolute;top:20px;left20;px;height:10px;width:10px">'+orak[8]+'</div>')
setTimeout('orra()',1500);
</script>
</body>
</html>
there are 1 line written on the screen from the script, then when the function orra is 'activated ' this line dissapears and the other 2 lines appears.
I wanted to not dissapear the first line, and I want in this way (with a function + other lines from outside the function)
What I'm missing ?( the browser is Explorer)
<html>
<body id='ez' >
<SCRIPT LANGUAGE="JavaScript">
var orak= new Array(16)
for (i=0;i<11;i++)
{
orak[i]=i
}
function orra() {
yy=0
xx=0
document.write('<div id="masik" style="position:absolute;top:'+yy+'px;left:'+xx+';px;height:10px;width:10px">'+orak[10]+'</div>')
document.write('<div id="masik" style="position:absolute;top:50px;left50;px;height:10px;width:10px">'+orak[9]+'</div>')
}
document.write('<div id="masik" style="position:absolute;top:20px;left20;px;height:10px;width:10px">'+orak[8]+'</div>')
setTimeout('orra()',1500);
</script>
</body>
</html>