标签:style blog http color io os java ar div
1、前台代码:
<asp:TextBox ID="TextBox1" runat="server" onfocus="return show();" ReadOnly="true" ></asp:TextBox><asp:Calendar ID="Calendar1" runat="server" OnSelectionChanged="Calendar1_SelectionChanged" Style="display:none;"></asp:Calendar> <script type="text/javascript"> function show() { document.getElementById("<%= Calendar1.ClientID%>").style.display = "block"; return false; } </script>
2、后台代码:
protected void Calendar1_SelectionChanged(object sender, EventArgs e) { TextBox1.Text = Calendar1.SelectedDate.ToShortDateString(); Calendar1.Attributes.Add("display", "none"); }
标签:style blog http color io os java ar div
原文地址:http://www.cnblogs.com/caishuhua226/p/3973993.html