アクセス毎に背景色を変化
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> <script type="text/javascript"> <!-- function cngBg(){ myDate = new Date(); var s = myDate.getSeconds(); var t = (s - 7 * (Math.floor( s / 7 ))); switch (t){ case 0 :document.bgColor = '#ff4444'; break; case 1 :document.bgColor = '#ff9d88'; break; case 2 :document.bgColor = '#f2ff88'; break; case 3 :document.bgColor = '#88ff21'; break; case 4 :document.bgColor = '#66eaff'; break; case 5 :document.bgColor = '#6648ff'; break; case 6 :document.bgColor = '#ff88ff'; break; } } window.onLoad = cngBg(); //--> </script> </head> <body> </body> </html>