<!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=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function displayTime()
{ var now=new Date();
var hour=now.getHours();
var minute=now.getMinutes();
var second=now.getSeconds();
//document.write("现在时间是"+hour+"点"+minute+"分"+second+"秒");
document.myform.myclock.value=hour+"点"+minute+"分"+second+"秒";
setTimeout("displayTime()",1000)
}
</script>
</head><body onload="displayTime()">
<form name="myform">
<input type="text" name="myclock" value="" />
</form>
</body>
</html>
我把document.write(1);不注释的话就报错 
注释的话就没问题 
我想知道这是什么问题 
错误提示是'document.myform.myclock' 为空或不是对象 
myform是我的form名称,myclock是我的文本框名称。