Fortune Telling Collection - Horoscope - Javascript display time on the background picture.

Javascript display time on the background picture.

& lthtml & gt

& lt scripting language = "javascript">

Function clockon(){

var Date = new Date();

var YY = date . getyear();

var MM = date . getmonth()+ 1;

var DD = date . getdate();

var KK = date . getday();

var HH = date . get hours();

var mm = date . get minutes();

var SS = date . get seconds();

If (mm <10) mm = "0"+mm;

if(DD & lt; 10)DD = " 0 "+DD;

If (hh<10) hh = "0"+hh;

If (mm <10) mm = "0"+mm;

if(SS & lt; 10)SS = " 0 "+SS;

Switch (kk) (

Case 1:

KK= "Monday";

Break;

Case 2:

KK= "Tuesday";

Break;

Case 3:

KK= "Wednesday";

Break;

Case 4:

KK= "Thursday";

Break;

Case 5:

KK= "Friday";

Break;

Case 6:

KK= "Saturday";

Break;

Case 0:

KK= "Sunday";

Break;

}

Var str_date= "Current time:" +YY+ "Year" +MM+ "Month" +DD+ "Day"+KK+""+HH+":"+MM+":"+SS;

if(document.all){

div _ date.innerHTML = str _ date

}

var timer=setTimeout("clockon()",200);

}

& lt/script & gt;

& ltstyle & gt

#qq{

Left margin:12px;

padding-top: 10px;

Background color: white;

Height: 30px

}

#q{

Left margin:12px;

Background color: white;

Height:170px;

}

#a{

Display: embedded;

Width: 25px

}

#dd{

Filling: 3px

Left padding:12px;

Fill-Right:12px;

Border: 1 solid;

Border color: # FF9966

Border-right-style: hidden;

Display: embedded;

Height: 24px

Left margin:10px;

}

#ff{

Filling: 3px

Left padding:12px;

Fill-Right:12px;

Border: 1 solid;

Border color: # FF9966

Border-right-style: hidden;

Display: embedded;

Height: 24px

}

#gg{

Filling: 3px

Left padding:12px;

Fill-Right:12px;

Border: 1 solid;

Border color: # FF9966

Border-right-style: hidden;

Display: embedded;

Height: 24px

}

#hh{

Filling: 3px

Left padding:12px;

Fill-Right:12px;

Border: 1 solid;

Border color: # FF9966

Border-right-style: hidden;

Display: embedded;

Height: 24px

}

#jj{

Filling: 3px

Left padding:12px;

Fill-Right:12px;

Border: 1 solid;

Border color: # FF9966

Border-right-style: hidden;

Display: embedded;

Height: 24px

}

#kk{

Filling: 3px

Left padding:12px;

Fill-Right:12px;

Border: 1 solid;

Border color: # FF9966

Display: embedded;

Height: 20px

}

#ww

Left margin:10px;

Height:170px;

Width: 760px

Border: 1 solid;

Border color: # FF9966

Display: embedded;

Background color: white;

}

#ww table {

Margin-Top: 5px

}

#ww table td{

Line height:18px;

}

# Time {

padding-top: 10px;

Font thickness: bold;

Height: 30px

}

#qq div,#time{

Filter: progid:DXImageTransform. Microsoft . gradient(startColorStr = white,endColorStr = # ffad 84);

font-size: 12px;

}

& lt/style & gt;

& ltbody onLoad = " clock on()" & gt;

& ltdiv & gt

& ltdiv id = " qq " & gt

& ltdiv id = "dd"> hotspot navigation

& ltdiv id = "ff"> Video, movies and TV.

& ltdiv id = "gg"> Leisure and entertainment.

& ltdiv id = "hh"> community chat

& ltdiv id = "jj"> intra-county navigation.

& ltdiv id = "kk"> larger ...

& lt/div & gt;

& ltdiv id = " q " & gt

& ltdiv id = " ww " & gt

& lttable width = " 100% " style = " font-size: 12px;" & gt

& lttr align="center " >

& lttd & gt 12 Hoh Xil

& lttd & gt I like music.

& lt/tr & gt;

& lttr align="center " >

& lttd & gt Sohu Music

& lttd & gt 17 173 & lt; /TD & gt; & lttd & gt Sina Games

& lttd & gt Tom Game

& lt/tr & gt;

& lttr align="center " >

& lttd & gt The Legend of Mill

& lttd & gt entertainment video

& lttd & gt desktop program

& lt/tr & gt;

& lttr align="center " >

& lttd & gt Mobile Games

& lttd & gt Xi Xi haha

& lt/tr & gt;

& lt/table & gt;

& lt div id = "time">< marquee behavior = "alternative" scrolldelay = "150" scrollamount = "3" >< div align = "center" id = "div _ date" > & lt/div & gt; & lt/blink & gt; & lt/marquee & gt; & lt/div & gt;

& lt/div & gt;

& lt/div & gt;

& lt/div & gt;

& lt/body & gt;

& lt/html & gt;

Look at the code above. ....