Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

Checkbox form validation in Firefox

By: a guest on Feb 27th, 2012  |  syntax: None  |  size: 0.12 KB  |  hits: 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. }