JavaScript Programming
JavaScript > Code Examples
Accept Terms
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Accept Terms
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function checkCheckBox(f){
if (f.agree.checked == false )
{
alert('Please check the box to continue.');
return false;
}else
return true;
}
// End -->
</script>
</HEAD>
<BODY>
<form action="/yourscript.cgi-or-your-page.html" method="POST" onsubmit="return checkCheckBox(this)">
I accept: <input type="checkbox" value="0" name="agree">
<input type="submit" value="Continue Order">
<input type="button" value="Exit" onclick="document.location.href='/index.html';">
</form>
<p><center>
<font face="arial, helvetica" size"-2">Happy Codings :-) JavaScript Code Examples<br>
by <a href="http://javascript.happycodings.com/">Happy Codings :-) JavaScript Code Examples</a></font>
</center><p>