<%@ Page Language="VB" %> <script runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Me.lblText1.Text = DatePart(DateInterval.Day, Date.Now()) Me.lblText2.Text = DatePart(DateInterval.Month, Date.Now()) Me.lblText3.Text = DatePart(DateInterval.Year, Date.Now()) Me.lblText4.Text = DatePart(DateInterval.Hour, Date.Now()) Me.lblText5.Text = DatePart(DateInterval.Second, Date.Now()) Me.lblText6.Text = DatePart(DateInterval.Minute, Date.Now()) End Sub </script> <html> <head> </head> <body> <form runat="server"> <asp:Label id="lblText1" runat="server"></asp:Label><br /> <asp:Label id="lblText2" runat="server"></asp:Label><br /> <asp:Label id="lblText3" runat="server"></asp:Label><br /> <asp:Label id="lblText4" runat="server"></asp:Label><br /> <asp:Label id="lblText5" runat="server"></asp:Label><br /> <asp:Label id="lblText6" runat="server"></asp:Label><br /> </form> </body> </html>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท