为什么把setInterval(a);改成 a();不会显示结果呢, 在方程后加上方程名字()不是运行方程么
function a(){
var date=new Date();
weekday=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];
time=date.getFullYear()+"年"+[date.getMonth()+1]+"月"+date.getDate()+"日"+weekday[date.getDay()]+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds();
document.getElementById("clock").value= time;
}
setInterval(a);