0
叫我有以下的網頁,其中有複選框和文本框複選框沒有被jQuery的
`<asp:CheckBox ID="ChkCcList" runat="server" Text="Email CC list" />
</td>
<td><asp:TextBox ID="txtEmail" TextMode="MultiLine" runat="server" MaxLength="200" Height="70px" Width="201px" Enabled = "false"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator" runat="server" ControlToValidate="txtEmail"
ErrorMessage="<br />Please enter valid emails." ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*([;]\s*\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*)*"></asp:RegularExpressionValidator>
<br /><br /></td>
</tr>`
jQuery代碼:
$('#ChkCcList').click(function() {
if (!$(this).is(':checked')) {
this.checked = confirm("Are you sure?");
}
});
`
可以請你告訴我,爲什麼當點擊複選框時不會調用這個按鈕
請提供呈現的HTML而不是您的服務器端代碼。 – PeterKA 2014-11-04 13:29:37
這不是經典的asp,我已經將其重新命名爲asp.net – John 2014-11-04 16:28:47