js设置控件只读

通过系统自带属性设置,内容不能回发

<asp:TextBox ID="txtStartDate" runat="server" Width="80px"  ReadOnly="true"></asp:TextBox>

下面的设置可以实现只读,并且回发数据(或者通过js设置控件只读)

<asp:TextBox ID="txtStartDate" runat="server" Width="80px"  onFocus="this.blur();"></asp:TextBox>

posted on 2011-06-22 17:53  于红超  阅读(1666)  评论(1编辑  收藏  举报