Latest web development tutorials

HTML DOM Checkbox form properties

Checkbox Object Reference Checkbox objects

Definition and Usage

form property returns a reference to the form that contains the checkboxes.

This property returns the form object.

grammar

checkboxObject.form


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support form properties


Examples

Examples

Examples plane returned form the checkbox belongs id:

<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function displayResult () {
var x = document.getElementById ( "myCheck") form.id.;
alert (x);
}
</ Script>
</ Head>
<Body>

<Form id = "form1">
<Input type = "checkbox" id = "myCheck"> do you like summer?
</ Form>
<Button type = "button" onclick = "displayResult ()"> select box displays a form ID </ button>

</ Body>
</ Html>

try it"


Checkbox Object Reference Checkbox objects