我需要清除/重置我TextBox1中被設置爲只讀=「真」。我在另一個Textbox2中使用了一個textchanged事件來計算Textbox1的值。 Textbox2中的值不會在重置時清除。任何建議?? .. 我復位清除只讀文本框
function resetForm($form) {
$form.find('input:text, input:password, input:file, select').val('');
$form.find('input:checkbox')
.removeAttr('checked').removeAttr('selected');
}
我的aspx代碼
<asp:TextBox ID="TextBox2" runat="server" ReadOnly="true" />
<asp:TextBox ID="Textbox1" runat="server" OnTextChanged="Textbox1_TextChanged" AutoPostBack="true"></asp:TextBox>
1.設置只讀關 2.復位 3.設置只讀 – heikkim
上的設置文本帶javascript的文本框不受readonly的影響。只讀與用戶輸入有關,而不與程序有關 - 不是隻讀程序。 – Aristos