Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Checkbox form validation in Firefox

By: a guest on Feb 27th, 2012  |  syntax: None  |  size: 0.12 KB  |  views: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var isChecked = document.forms['myform'].elements['mycheckbox'].checked;
  2. if (!isChecked) {
  3.   alert('You must agree');
  4. }