<html>
<head>
<script type="text/javascript">
function clock(){
var time=new Data;
document.getElementById("ab").value=time;
}
var cd=setInterval("clock()",1000);
</script>
</head>
<body>
<form>
<input type="text" id="ab"/>
</form>
</body>
</html>
data 改成Date();
<html>
<head>
<script type="text/javascript">
function clock(){
var time=new Date();
document.getElementById("ab").value=time;
}
var cd=setInterval("clock()",1000);
</script>
</head>
<body>
<form>
<input type="text" id="ab"/>
</form>
</body>
</html>