Latest web development tutorials

HTML DOM Input Search form properties

Input Search Object Reference Input Search Object

Examples

Returns <input type = "search"> id element form belongs:

var x = document.getElementById ( "mySearch") form.id.;
x The output is:
myForm

try it"

Definition and Usage

form property returns a reference to the form that contains the search field.

This property returns the form object success.

Note: This property is read-only attribute.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support form property.


grammar

searchObject .form

technical details

return value: It contains search field is a reference to the form elements. If the search field is not in the form, return null.


Input Search Object Reference Input Search Object