[solved]How to do terms with checkbox?
Hi
There is a <input name="checkbox" type="checkbox" value="checkbox" />
and <asp:imagebutton id="buttonRegister" /> in an aspx form.
I added the Ajax script. If I uncheck the checkbox, it would pop up. However, if I checked it, it still pop up.
What's wrong with the code?
-
$(document).ready(function() {
$("#ctl00_cphContent_buttonRegister").click(function(e){
if(!$("#checkbox").is(':checked'))
{
alert("you did not check the agree to terms...");
e.preventDefault();
}
});
});