请大家看看有错吗??为什么显示不出来后面的日和时间
<script type="text/javascript"> var attime; function clock(){ var time=new Date(); attime= time.getFullYear()+"-"+time.getMonth()+"-"+time.getDay()+"."+time.getHours()+":"+time.getMinutes()+":"+time.getSeconds(); document.getElementById("clock").value = attime; } var su=setInterval(clock,2000) </script> </head> <body> <form> <input type="text" id="clock" size="50" />