2 回答
TA贡献1744条经验 获得超4个赞
1 <head>
2 <script type="text/javascript">
3 function getdate()
4 {
5 var day=new Date();
6 document.getElementById("daydate").innerHTML=day.getFullYear()+"年"+((day.getMonth()+1)>9?(day.getMonth()+1):"0"+
7 (day.getMonth()+1))+"月"+(day.getDate()>9?day.getDate():"0"+day.getDate())+"日"+(day.getHours()>9?day.getHours():"0"+
8 day.getHours())+":"+(day.getMinutes()>9?day.getMinutes():"0"+day.getMinutes())+":"+(day.getSeconds()>9?day.getSeconds():"0"+ day.getSeconds());
9 }
10 window.setInterval("getdate()",1000);
11 </script>
12
13 </head>
14 <body>
15 <form id="form1" runat="server">
16 <div>
17 <asp:Label runat="server" ID="daydate" Text=""></asp:Label>
18 <input type="button" onclick="alert('123');" value="123" />
- 2 回答
- 0 关注
- 749 浏览
添加回答
举报