1<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD">2 3"http://www.w3.org/1999/xhtml">45<title> Beauty Clock </title>6<script type="Text/javascript">7onload =function () {8 varMnclock =function () {9 //Add a picture label to the DivTen varImage = document.getElementById ("IMG1"); One varImage = document.getElementById ("Img2"); A varImage = document.getElementById ("IMG3"); - varImage = document.getElementById ("Img4"); - varImage = document.getElementById ("Img5"); the varImage = document.getElementById ("Img6"); - //Dv.appendchild (document.createelement ("img")); - - //get current time, hours, minutes, such as 12:34 + varMyDate =NewDate (); - varhour =mydate.gethours (); + if(Hour <Ten) { Ahour ="0"+hour; at } - varminute =mydate.getminutes (); - if(Minute <Ten) { -minute ="0"+minute; - } - varSecond =mydate.getseconds (); in if(Second <Ten) { -Second ="0"+second; to } + //look for pictures that correspond to time, such as 12_34, note 01:02 this format - //put the picture in the div tag the //img.src = "source/mm_ full/" + Hour + "_" + Minute + ". jpg"; * varHour1 = Hour.tostring (). CharAt (0); $ Panax Notoginseng varHOUR2 = Hour.tostring (). CharAt (1); - varMinute1 = Minute.tostring (). CharAt (0); the varMinute2 = Minute.tostring (). CharAt (1); + varSecond1 = Second.tostring (). CharAt (0); A varSecond2 = Second.tostring (). CharAt (1); theIMG1.SRC ="source/js_ Electronic Clock/countdown-"+ Hour1 +". PNG"; +IMG2.SRC ="source/js_ Electronic Clock/countdown-"+ HOUR2 +". PNG"; -IMG3.SRC ="source/js_ Electronic Clock/countdown-"+ Minute1 +". PNG"; $IMG4.SRC ="source/js_ Electronic Clock/countdown-"+ Minute2 +". PNG"; $IMG5.SRC ="source/js_ Electronic Clock/countdown-"+ Second1 +". PNG"; -IMG6.SRC ="source/js_ Electronic Clock/countdown-"+ Second2 +". PNG"; - } theSetInterval (Mnclock, +); - }Wuyi</script> the -<body> Wu<div ID ="DV"> -"#"alt="Alternate Text"ID ="IMG1"/> About"#"alt="Alternate Text"ID ="Img2"/> $"#"alt="Alternate Text"ID ="IMG3"/> -"#"alt="Alternate Text"ID ="Img4"/> -"#"alt="Alternate Text"ID ="Img5"/> -"#"alt="Alternate Text"ID ="Img6"/> A</div> + the</body> -Beauty clock + electronic Clock