i have my header, where i do the following code to call a random image from the site folder:
Expand|Select|Wrap|Line Numbers
- <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:
Expand|Select|Wrap|Line Numbers
- document.write ("<div style="background: url('../pics/site/"+d+".jpg')"></div>")
can You please help me, how to write the correct code?
thx.