Return to Snippet

Revision: 37849
at December 18, 2010 07:46 by RuslanSavenok

Initial Code
function checkDOB() {
  var date = new Date();
  var full18 = new Date(date.getFullYear() - 18, date.getMonth(), date.getDate());
  var dob = new Date(form['yyyy'].value, form['mm'].value, form['dd'].value);

  if (full18 < dob) {
    alert('You must be 18 years or older to be eligible for this offer. Please enter your correct Date of Birth or click Pass to see the next offer.');
    return false;

Initial URL

Initial Description

Initial Title
Check Date of Birth

Initial Tags

Initial Language