Script Categories

Forms >>> Checkbox Text.

The user no longer needs to click precisely on the checkbox to check and uncheck it. Clicking the text after a checkbox can do this just like windows programs.

Clicking this text also checks the box to the left.

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
function changeBox(cbox) {
box = eval(cbox);
box.checked = !box.checked;
//  End -->
<form name=demoform>
type=checkbox name=agreebox>
<a href="" onClick="changeBox('document.demoform.agreebox');return false">Clicking this text also checks the box to the left.</a>

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).