<div> <p> <span id="time"></span> <script type="text/javascript"> var date=new Date(); var year=date.getFullYear(); var month=date.getMonth()+1; var day=date.getDate(); var weekday=["周日","周一","周二","周三","周四","周五","周六"]; var num=date.getDay(); function clock(){ var hour=date.getHours(); if(hour<10){ hour="0"+hour; { var minutes=date.getMinutes(); if(minutes<10){ minutes="0"+minutes; } var seconds=date.getSeconds(); if(seconds<10){ seconds="0"+seconds; } var time=hour+":"+minutes+":"+seconds; document.getElementById("clock").value=time; } setInterval(clock,1000); document.write(year+"年-"+month+"月-"+day+"日"+"今天是:"+weekday[num]); </script> </p> </div>
DW的错误提示显示在</script>这一行
卖火柴的小舒