Javascript Reference
Categories: SCRIPT

javascript SCRIPT htmlFor

@March 15, 2008, 1:22 a.m.
htmlForFirefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 1  

Read-only  

Returns the value (element ID) assigned to the for attribute of a script element. This attribute points to the ID of the element to which the script is bound when a specific event (set by the event attribute) fires for the element. Not functional in Netscape 6.

 
Example
 
if (document.getElementById("helpScript").htmlFor == "helpButton") {
    ...
}
 
Value

String.

 
Default

None.


Powered by Linode.