ASP.NET 简单实现数字时钟
每隔1000毫秒(1s)获取一次当前时间
<asp:ScriptManager ID="ScriptManager_Time" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel_Time" runat="server">
    <ContentTemplate>
        <asp:Label ID="Label_ShowTime" runat="server" Text="时间"></asp:Label>
        <asp:Timer ID="Timer_Time" runat="server" OnTick="Timer_Time_Tick" Interval="1000">
        </asp:Timer>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="Timer_Time" EventName="Tick" />
    </Triggers>
</asp:UpdatePanel>
    [支持/订阅](https://afdian.com/a/taadis)作者,以获得更多服务.
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号