在程序中加了个日历控件,如下调用
<asp:TextBox ID="TBDate" runat="server" Width="136px" Onfocus="calendar()" AutoPostBack="True"></asp:TextBox>
在后台程序中判断
Protected Sub TBDate_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TBDate.TextChanged
If format(TBDate.Text,"YYYY-mm-dd") < Format(Now, "yyyy-mm-dd") Then
Response.Write("<script>alert('选择的日期无效')</script")
End If
End Sub
在textchanged设了断点调试,为什么运行不到这段程序呢?
<asp:TextBox ID="TBDate" runat="server" Width="136px" Onfocus="calendar()" AutoPostBack="True"></asp:TextBox>
在后台程序中判断
Protected Sub TBDate_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TBDate.TextChanged
If format(TBDate.Text,"YYYY-mm-dd") < Format(Now, "yyyy-mm-dd") Then
Response.Write("<script>alert('选择的日期无效')</script")
End If
End Sub
在textchanged设了断点调试,为什么运行不到这段程序呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货