Properties


FOR Attribute | htmlFor Property

Sets or retrieves the object that is bound to the event script.

Syntax

HTML<ELEMENT FOR = oObject... >
Scripting[ oObject = ] object.htmlFor

Possible Values

oObjectString that specifies or receives a scripting object or an object identifier that is bound to the event script.

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

DHTML expressions can be used in place of the preceding value(s). As of Internet Explorer 8, expressions are not supported in IE8 mode. For more information, see About Dynamic Properties.

Standards Information

This property is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 2 World Wide Web link.

Applies To

SCRIPT, HTMLScriptElement Constructor
Tags :


Community Content

skierpage
script "for" attribute is MS-proprietary
This property is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 2

No it isn't, it is "reserved for future use". If you use <SCRIPT FOR="someObject" EVENT="someEvent"> you are deep in MS proprietary junk. In HTML4 the for attribute and htmlFor DOM property are only defined for form elements, and in HTML5 the event and htmlFor IDL attributes of the script element are both obsolete and browsers are instructed to ignore them.
Tags : proprietary

Page view tracker