<HTML>
<HEAD>
<TITLE> time and date-show clock </TITLE>
<meta charset= "Utf-8" >
</HEAD>
<body bgcolor= "#fef4d2" Onload=showclock () >
<br>
<div id= "Clock" ></div>
<script>
function Changeclock ()
{
var d = new Date ();
var year=d.getfullyear ();
var month=d.getmonth () +1;
if (month<10) {
Month= "0" +month;
}
var day=d.getdate ();
if (day<10) {
day= "0" +day;
}
var hours=d.gethours ();
var dn= "AM";
if (hours>12) {
Dn= "PM";
hours=hours-12;
}else if (hours==0) {
hours=12;
}
var minute=d.getminutes ();
if (minute<10) {
Minute= "0" +minute;
}
var seconds=d.getseconds ();
if (seconds<10) {
seconds= "0" +seconds;
}
document.getElementById ("Clock"). innerhtml=year+ "-" +month+ "-" +day+ "" +hours+ ":" +minute+ ":" +seconds+ "" +DN;
document.getElementById ("Clock"). InnerHTML = D.getfullyear () + "-" + (D.getmonth () + 1) + "-" + d.getdate () + "" + D.G Ethours () + ":" + d.getminutes () + ":" + d.getseconds ();
}
Window.setinterval (changeclock,1000);
</script>
</BODY>
</HTML>
JS Implementation Clock