hi all,
i have my header, where i do the following code to call a random image from the site folder:
but now i want to replace a table with a DIV, to make the pageload faster.
so i have tried the following:
but this is not working.
can You please help me, how to write the correct code?
thx.
i have my header, where i do the following code to call a random image from the site folder:
Code:
<script language="javascript" type="text/javascript">
p=65*Math.random();
d=parseInt(p);
document.write ("<table background='../pics/site/"+d+".jpg'></table>");
</script>
so i have tried the following:
Code:
document.write ("<div style="background: url('../pics/site/"+d+".jpg')"></div>")
can You please help me, how to write the correct code?
thx.
Comment