Accept Terms | JavaScriptSource

Accept Terms

Colin PC May 21, 2001


This script allows your visitors to accept your terms and conditions before proceeding by checking a box. If they don't agree, an exit button will takes them to a designated page.

I accept:


Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: acceptTerms


Paste this code into the HEAD section of your HTML document.


Paste this code into the BODY section of your HTML document

Leave a Response


I am trying to create a "terms and agreement" box that will, once clicked, allow the "Submit" button to be clicked. I don't want the "Submit" button to be available to click until after the terms are agreed to. Any suggestions? Thank you.

Arkady Dec 4, 2014


brittany smith Apr 19, 2013

I found your "accept terms" javascript on JavaScript Forum.[br /]I need a simple client side only script to make sure those who access my pages are over age 18. Once they check the box, they should have full access to my site for good, but if they send an inside page to a friend, the friend should automatically be redirected to the index page with the "accept terms" form.[br /][br /]1.) Will this script do that?[br /]2.) I have a list of page numbers that users can click on to go to any page they want, What script do I need to allow them to go to any selected page without having to recheck the terms of agreement box each time?[br /][br /]I appreciate your knowledge and thank you for your help![br /][br /]Michael Storer, Los Angeles

michael storer Apr 8, 2009

This is some neat code- will be suggesting it to my members.

David Dec 15, 2008

Set the script you want to use for processing here: action="yourFormScript.php". Then, set the URL you want to script directed to for the exit button here: onclick="document.location.href='yourFile.html';">

Lee Oct 31, 2008