Checkbox Object

By: aathishankaran  

The checkbox object is the form object that is best equipped to denote logical (true or false) data. It acts as a toggle switch that can be turned on or off either by the user or by your JavaScript code. To define a checkbox, use the following HTML syntax:

<INPUT TYPE="checkbox"[NAME="objectName"] [VALUE="value"] [CHECKED][onClick="methodName"]> [displayText] 

For example, the following checkbox allows users to specify their foreign language proficiencies: 

<input type=checkbox name="language"> I speak multiple languages.





Check box Example



<Hl>Example for CheckBox</Hl>

<H2>Click on the checkBox and find the status</H2>


<Form Name=form1>



<Input Type=CheckBox



if (svr. checked)


alert('The status is true');




alert('The status is false');









If you check the checkbox

If you uncheck the checkbox


Archived Comments

1. outstanding....
View Tutorial          By: subhasish biswas at 2009-04-19 00:16:50

Most Viewed Articles (in JSP )

Latest Articles (in JSP)

Comment on this tutorial