<ptml> <pead> <meta name= "generator" content= "Microsoft FrontPage 6.0" > <meta name= "ProgId" Conte Nt= "FrontPage.Editor.Document" > <meta http-equiv= content-type "content=" text/html; charset=gb2312 "> <title> page Load effect </title> </pead> <body> <style type=" Text/css "> #colo R Div {width:5px; height:5px; float:left; margin:0 2px; } </style> <div id= "Color" > <div Gray ' "></div> <div Gray '" ></div> <div Gray ' " gt;</div> <div Gray ' "></div> <div Gray '" ></div> <div Gray ' "></div> </div > <script> var v=document.getelementsbytagname (' div '); var i=v.length-1; function Chg_col () {q= (i<=1)? v.length-1:i-1 document.getelementsbytagname (' div ') [q].style.background= "Gray" document.getElementsByTagName (' div ') [i].style.background= "Red" i= (i>=v.length-1)? 1:i+1 settimeout ("Chg_col ()" ,)} chg_col () </script> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]