| 发表于:2007-09-27 14:35:56 楼主 |
<%@ page language= "c# " autoeventwireup= "true " codefile= "js.aspx.cs " inherits= "js " %> <!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 runat= "server "> <title> 无标题页 </title> </head> <body> <form id= "form1 " runat= "server "> <div> <asp:scriptmanager id= "scriptmanager1 " enablepartialrendering= "true " runat= "server "> </asp:scriptmanager> </div> <asp:updatepanel id= "updatepanel1 " runat= "server "> <contenttemplate> <asp:label id= "label1 " runat= "server " text= "label "> </asp:label> </contenttemplate> </asp:updatepanel> <script type= "text/javascript " language= "javascript "> function updatetime() { var label = document.getelementbyid( "label1 "); if (label) { var time = (new date()).localeformat( " "); label.innerhtml = time; } } updatetime(); window.setinterval(updatetime, 1000); </script> </form> </body> </html> |
|
|
|
|