<input id=a1>
<script>
var a=new Date()
a1.value=a.getHours()+":"+a.getMinutes()+":"+a.getSeconds()
</script>
<script>
var a=new Date()
a1.value=a.getHours()+":"+a.getMinutes()+":"+a.getSeconds()
</script>
调试欢乐多
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 3</title>
</head>
<body >
<input type="text" name = "aa" value=''></body>
<script language="javascript">var strdate;
var date = new Date();
strdate = date.getYear() +"/"+ (date.getMonth()+1) +"/"+ date.getDate();
document.all.aa.value=strdate;
</script></html>
<script>
window.onload=function(){
var a=new Date()
document.all.a1.value=a.getHours()+":"+a.getMinutes()+":"+a.getSeconds()
}
</script>
<script>
window.onload=function(){
var a=new Date()
h=a.getHours().toString()
m=a.getMinutes().toString()
s=a.getSeconds().toString()
document.all.a1.value=((h.length==1)?"0"+h:h)+":"+((m.length==1)?"0"+m:m)+":"+((s.length==1)?"0"+s:s)
}
</script>
<script>
window.onload=showtime
function showtime(){
document.all.a1.value=new Date().toLocaleString();
setTimeout("showtime()",1000)
}
</script>