When running, press F5 to see the effect!
<script>
S=new Array (3)
S[0]=math.floor (Math.random () *256) + ""
S[1]=math.floor (Math.random () *256) + ""
S[2]=math.floor (Math.random () *256) + ""
A=S[0]+S[1]+S[2]
document.write ("<body bgcolor=" +a+ ">")
document.write ("</body>")
</script>
<script>
s= "Icon/icon" +math.floor (Math.random () *18) + ". gif"
document.write ("<body background=" +s+ ">")
document.write ("</body>")
</script>
Red, green and blue three colors:
<script>
S=new Array (3)
s[0]= "ff0000"
s[1]= "00FF00"
s[2]= "0000FF"
I=math.floor (Math.random () *3)
document.write ("<body bgcolor=" +s[i]+ ">")
document.write ("</body>")
</script>
button on:
<script>
S=new Array (3)
s[0]= "ff0000"
s[1]= "00FF00"
s[2]= "0000FF"
I=math.floor (Math.random () *3)
document.write ("<input type= ' button ' value= ' buttons ' style=background-color:" +s[i]+ ">")
</script>
Display pictures randomly:
Add the following code between
<script language= "JavaScript" >
BG = new Array (3); Set the number of pictures 2
Bg[1] = ' icon/1.gif '//Display picture path
BG[2] = ' icon/2.gif '
BG[3] = ' icon/3.gif '
index = Math.floor (Math.random () *bg.length);
document.write ("<body background=" +bg[index]+ ">");
</script>