大家帮忙改改错

来源:百度知道 编辑:UC知道 时间:2024/05/18 11:28:25
<html>

<head>
<title >山景</title>
<script language="JavaScript">
<!--
var timestr;
function clock()
{
now=new date();
hours=now.gethours();
minutes=now.getminutes();
seconds=now.getseconds();
timestr=" "+hours;
timestr+=":"+minutes;

timestr+=":"+seconds;

document.clock.time.value=timestr;
timer=settimeout("clock()",1000);
}
-->
</script>
</head>
<body onload="clock()">
<form name="clock" >时间

<input type="text" name="time" size="20" value="" >

</form>
</body>
</html>
一个简单的时间显示脚本,为什么不显示时间呢

如果可能的话,给我发邮件,673056097@qq.com,谢了

<html>

<head>
<title >山景</title>
<script language="JavaScript">
<!--
var timestr;
function clock()
{
var now=new Date();
hours=now.getHours();
minutes=now.getMinutes();
seconds=now.getSeconds();
timestr=" "+hours;
timestr+=":"+minutes;

timestr+=":"+seconds;

document.clockc.time.value=timestr;
setTimeout("clock()",1000);
}
-->
</script>
</head>
<body onload="clock()">
<form name="clockc" >时间

<input type="text" name="time" size="20" value="" >

</form>
</body>
</html>
我已经修改好了,看一下可不可以.