Tip: You can modify some of the code before running
<%@ page language= "java" import= "java.util.*" pageencoding= "Utf-8"%> <! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" > <ptml> <pead> <script type= "text/ JavaScript "> Function bodyload () {var datetime=new Date (); var hh=datetime.gethours ();/hours var mm= Datetime.getminutes ()//minute var ss=datetime.getseconds ()//second Var yy=datetime.getfullyear ()//year Var mm= Datetime.getmonth () +1; Month-Because January this method returned to 0, so add 1 var dd=datetime.getdate ();//Days of Var week=datetime.getday ()/week (0~6,0 for Sunday) var days=["Day", "one", " Two "," three "," four "," five "," six ",] document.getElementById (" date "). innerhtml=yy+" Year "+mm+" month "+dd+" Day "+" Week "+days[week]; document.getElementById ("Time"). innerhtml=hh+ "When" +mm+ "minutes" +ss+ "seconds"; SetTimeout (bodyload,1000); } </script> </pead> <body onload= "bodyload ()" > <span id= "date" ></span> <span id= "time "></span> </body> </ptml></td> </tr> </table>