为什么分和秒出不了0的值
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
*{ margin:0px; padding:0px;}
#wrap{ height:200px;
width:300px;
margin:100px auto;
border:2px solid #F00;
line-height:200px;
text-align:center;}
</style>
<script>
window.onload=function(){
var sj=document.getElementById('sj');
function checkTime(i){
if(i<10){
i="0"+i;
}
return i;
}
show();
function show(){
var myDate=new Date();
var year=myDate.getFullYear();
var month=myDate.getMonth()+1;
var date=myDate.getDate();
var weekday=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]
var hours=myDate.getHours();
var minutes=myDate.getMinutes();
var seconds=myDate.getSeconds();
sj.innerHTML=year+"年"+month+"月"+date+"日"+" "+weekday[myDate.getDay()]+" "+hours+":"+minutes+":"+seconds
minutes=checkTime(minutes);
seconds=checkTime(seconds);
setTimeout(show,1000);
}
}
</script>
</head>
<body>
<div id="wrap">
<p id="sj"></p>
</div>
</body>
</html>