Setiap load page, background berganti warna

Demo :

Setiap page dimuat ulang, background akan berganti warna.




Cara membuatnya

Penempatannya
dibawah <body>
........
diatas </body>


<script type='text/javascript'>
//<![CDATA[

/* by JavaScript Kit (http://www.javascriptkit.com/script/script2/randombgcolor.shtml)*/

//Tempat warna background:
var bgcolorlist=new Array("#222222", "#FFFFBF", "#80FF80", "#EAEAFF", "#C9FFA8", "#F7F7F7", "#FFFFFF", "#DDDD00")

document.body.style.background=bgcolorlist[Math.floor(Math.random()*bgcolorlist.length)]
//]]>
</script>



Credit : JavaScript Kit

Alhamdulillah

1 comments:


  1. makasih kk

Posting Komentar


Creative Commons License
Setiap load page, background berganti warna by Nano Yulianto is licensed under a Creative Commons Attribution 3.0 Unported License.
Based on a work at http://nanoyulianto.blogspot.com/2011/01/setiap-load-page-background-berganti.html.
Permissions beyond the scope of this license may be available at http://nanoyulianto.blogspot.com/.