SIZE Attribute | size Property

Internet Development Index

Sets or retrieves the size of the control.

Syntax

HTML<ELEMENT SIZE = iSize... >
Scriptingobject.size [ = iSize ]

Possible Values

iSizeInteger that specifies or receives the size, in characters.

The property is read/write. The property has no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.

Remarks

Although this property is read/write, no change is visible when you set the size of the input type=reset, input type=submit, and input type=image objects. However, you can detect a change to the size property for these objects in code.

For the input type=text object, the size is in characters and represents the width of the text box. When the size is specified, the select object represents a list box with the specified number of rows.

Standards Information

This property is defined in HTML 3.2 Non-Microsoft link and is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text

See Also

maxLength