JS Calendar effects

Source: Internet
Author: User
Tip: You can modify some of the code before running

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> <pead> <title> Compact and practical calendar </title> <meta http-equiv= "Content-type" content= "text/html;charset=gb2312" > </pead> <body> <!--Add the following code to the <body Between > </body>--> <div > <script language= "javascript" > Function Year_month () {var now = new D Ate (); var yy = Now.getfullyear (); var mm = Now.getmonth () +1; var cl = ' <font color= ' #000000 ' > '; if (now.getday () = = 0) cl = ' <font color= ' #000000 ' > '; if (now.getday () = = 6) cl = ' <font color= ' #000000 ' > '; return (cl + yy + ' year ' + mm + ' month </font> '); function Date_of_today () {var now = new Date (); var cl = ' <font color= ' #000000 ' > '; if (now.getday () = = 0) cl = ' <font color= ' #000000 ' > '; if (now.getday () = = 6) cl = ' <font color= ' #000000 ' > ';Return (CL + now.getdate () + ' <b> day </b></font> '); function Day_of_today () {var day = new Array (); Day[0] = "Sunday"; DAY[1] = "Monday"; DAY[2] = "Tuesday"; DAY[3] = "Wednesday"; DAY[4] = "Thursday"; DAY[5] = "Friday"; DAY[6] = "Saturday"; var now = new Date (); var cl = ' <font color= ' #000000 ' > '; if (now.getday () = = 0) cl = ' <font color= ' #000000 ' > '; if (now.getday () = = 6) cl = ' <font color= ' #000000 ' > '; Return (CL + day[now.getday ()] + ' </font> '); function Curenttime () {var now = new Date (); var hh = now.gethours (); var mm = Now.getminutes (); var ss = Now.gettime ()% 60000; SS = (SS-(ss% 1000))/1000; var clock = hh+ ': '; if (mm <) clock + = ' 0 '; Clock + = mm+ ': '; if (SS < ten) clock + = ' 0 '; Clock + = SS; return (clock); function Refreshcalendarclock () {Document.all.calendarClock1.innerHTML = Year_month (); Document.all.calendarClock2.innerHTML = Date_of_todAy (); Document.all.calendarClock3.innerHTML = Day_of_today (); Document.all.calendarClock4.innerHTML = Curenttime (); } document.write (' <table border= 0 "cellpadding=" 0 "cellspacing=" 1 "width=" "bgcolor=" #000000 "height=" > ") ; document.write (' <tr><td width= "100%" height= "100%" align= "center" > "); document.write (' <table border= "0" cellpadding= "0" cellspacing= "0" width= "100%" hight= "100%" bgcolor= "#f2f2f2" Height= ">"); document.write (' <tr><td align= ' center "width=" 100% "height=" 100% ">"); document.write (' <font id= ' CalendarClock1 "></font><br>"); document.write (' <font id= ' CalendarClock2 "></font><br>"); document.write (' <font id= ' CalendarClock3 "></font><br>"); document.write (' <font id= ' CalendarClock4 "><b></b></font>"); document.write (' </td></tr></table> '); document.write (' </td></tr></table> '); SetInterval (' RefreshcaleNdarclock () ', 1000); </script> </div> </body> </ptml></td> </tr> </table>
Tip: You can modify some of the code before running

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.