Home > Element Reference : Field

Contents

### Field

A field is similar to a property, except that should not have a getter or setter. It is useful as a simple holder for a value.

The field element may have content which is code that determines the initial value of the field.

More information about Field

#### Attributes:

Attributes inherited from Element

class

The style class of the xbl:field. Multiple classes may be specified by separating them with spaces.

id

A unique identifier so that you can identify the xbl:field with. You can use this as a parameter to getElementById and other DOM functions and to reference the element in style sheets.

name

The name of the field, which is the name that can be used via a script. For example, if a field has the name width, it can be accessed with object.width, where object is a reference to the object.

readonly

If set to true, then the user cannot modify the value of the xbl:field. However, the value may still be modified by a script.

Copyright (C) 1999 - 2002 XULPlanet.com