Skip to Main Content
Webmaster in a Nutshell, Third Edition
book

Webmaster in a Nutshell, Third Edition

by Robert Eckstein, Stephen Spainhour
December 2002
Intermediate to advanced content levelIntermediate to advanced
576 pages
32h
English
O'Reilly Media, Inc.
Content preview from Webmaster in a Nutshell, Third Edition

Name

Input

Synopsis

                     form.elements[i]
form.elements[name]
form.name
                  

Properties

The Input object defines properties for each of the attributes of the HTML <input> tag, such as maxLength, readOnly, size, and tabIndex. In addition, it defines the following properties:

checked

A read/write boolean that specifies whether an input element of type “checkbox” or “radio” is checked (true) or not (false).

defaultChecked

A boolean that specifies whether an input element of type “checkbox” or “radio” is checked when first created or when it is reset to its initial state.

defaultValue

A string that specifies the text that appears in an input element of type “text” or “password” when it is first created or when it is reset to its initial state. For security reasons, this property does not affect input elements of type file.

form

A read-only reference to the Form object that contains the element. This property is defined for input elements of all types.

name

The name of this input element, as specified by the HTML name attribute. This property is defined for input elements of all types.

type

A string that specifies the type of the form element. This property mirrors the HTML type attribute. Legal values are listed in the following table; the default is text. Submit and Textarea objects also have a type property, with possible values select-one, select-multiple, and textarea. JS 1.1.

Type

Description

“button”

Push button

“checkbox”

Checkbox element

“file”

File upload element

“hidden” ...

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

Webmaster in a Nutshell, Second Edition

Webmaster in a Nutshell, Second Edition

Stephen Spainhour, Robert Eckstein

Publisher Resources

ISBN: 0596003579Purchase bookErrata Page