JavaScript - CheckBox Validation



Cheat sheet for checking for terms and conditions

//chkTerms checkbox ID
function chkTerms()
{
//if terms and conditions unchecked
if(document.getElementById("chkTerms").checked==false) 
{
//firing message if terms are not checked
alert('Please accept terms and conditions'); 
document.getElementById("").focus(); 
return false; 
}
}

Share |

 Cant find the page you are looking for?
 Help us to improve by adding the content that you are looking for.
 Leave a feedback
 We look forward to hear your comments and feedback.