Name

size — NN n/a IE 4 DOM 1

Synopsis

Read/Write

Roughly speaking, the width in characters that the input box should be sized to accommodate. In practice, the browser does not always accurately predict the proper width. See details in the SIZE attribute discussion for the INPUT element in Chapter 8. There is no interaction between the size and maxLength properties for this object.

Example

document.forms[0].myText.size = 12

Value

Positive integer.

Default

20

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.