Skip to Content
JavaScript: The Definitive Guide, 6th Edition
book

JavaScript: The Definitive Guide, 6th Edition

by David Flanagan
May 2011
Intermediate to advanced
1093 pages
40h 54m
English
O'Reilly Media, Inc.
Content preview from JavaScript: The Definitive Guide, 6th Edition

Name

FormControl — common features of all form controls

Synopsis

Most HTML form controls are <input> elements, but forms can also contain <button>, <select>, and <textarea> controls. This page documents the features that those element types have in common. See HTML Forms for an introduction to HTML forms, and see Form, Input , Select, and TextArea for more on forms and form controls.

The <fieldset> and <output> elements implement most, but not all, of the properties described here. This reference treats FieldSet and Output objects as FormControls even though they do not implement every property.

This page documents certain HTML5 form features (particularly form validation) which, at the time of this writing, were not yet widely implemented.

Properties

boolean autofocus

true if the control should automatically receive keyboard focus as soon as the document is loaded. (FieldSet and Output controls do not implement this property.)

boolean disabled

true if the form control is disabled. Disabled controls do not respond to user input and are not subject to form validation. (Output elements do not implement this property; FieldSet elements use it to disable all of the controls they contain.)

readonly Form form

A reference to the Form that is the owner of this control, or null if it does not have one. If a control is contained within a <form> element, that is its form owner. Otherwise, if the control has an HTML form attribute that specifies the ID of a <form>, that named form is the form owner. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaScript: The Definitive Guide, 5th Edition

JavaScript: The Definitive Guide, 5th Edition

David Flanagan

Publisher Resources

ISBN: 9781449393854Errata PageSupplemental Content