Page Dynamic display time changes in a number of ways, this article for you to use JavaScript specific implementation, interested friends do not miss
The code is as follows: <html> <head> <title></title> <script> function Getdatedemo () { /* //Declaration time var date = new Date (); alert (date);/Current time alert ( Date.tolocalestring ())//Convert to local time alert (date.getfullyear ());//Show Year alert (Date.getmonth () + 1);//Show Month 0-11, you need to add 1 alert (Date.getdate ()),//display January date alert (Date.getday ()),//show the date of the week, Weeks alert ( Date.gethours ())//Get hour time alert (date.getminutes ());//get Current minute alert (date.getseconds ());//get current number of seconds Alert (Date.getmilliseconds ());//Get the current number of milliseconds alert (date.gettime ());//Get the millisecond value from 0 o'clock midnight, January 1, 1970, to the current time */ Get year, month, day, hour, minute, second var mydate = new Date (); var years = Mydate.getfullyear (); var month = Mydate.getmonth ( + 1; var date = mydate.getdate (); var hours = mydate.gethours (); var minutes = mydate.getminutes (); &nb Sp var seconds = mydate.getseconds (); //month display as two digits as September if (Month < 10 ) { month = "0" + month; } if (date <) { date = "0" + date; } //Time stitching var dateTime = year + "years" + month + "Month" + Date + "Day" + Hours + "time" + minutes + "min" + seconds + "SEC"; //docume Nt.write (dateTime)//print current time var divnode = document.getElementById ("Time"); divnode.innerhtml = datetime; } window.setinterval ("Getdatedemo ()", 1000);//Every 1 seconds, call Getdatedemo () </script > </head> <body> <div id= "Time" ></div> </body> </ html>