Affordable web hosting - JavaScript Programmer’s Reference LINK object (Object/HTML) An object

JavaScript Programmer’s Reference LINK object (Object/HTML) An object that represents HTML tags in documents. Availability: DOM level 1 JavaScript 1.5 JScript 3.0 Internet Explorer 4.0 Netscape 6.0 Inherits from: Element object IE myLINK = myDocument.all.anElementID IE myLINK = myDocument.all.tags(”LINK”)[anIndex] IE myLINK = myDocument.all[aName] -myLINK = myDocument.getElementById(anElementID) -myLINK = myDocument.getElementsByName(aName) [anIndex] -myLINK = myLinkArray[anIndex] JavaScript syntax: -myLINK = myDocument.getElementsByTagName (”LINK”)[anIndex] HTML syntax: anIndex A reference to an element in a collection aName An associative array reference Argument list: anElementID The ID value of an Element object Object properties: charset, disabled, href, hreflang, media, readyState, rel, rev, title, type Event handlers: onClick, onDblClick, onError, onHelp, onKeyDown, onKeyPress, onKeyUp, onLoad, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onReadyStateChange The tag is used to link in external style sheet files. You can link in CSS or JSS style sheets with this technique. It allows the style sheets to be shared amongst many documents and for the site appearance to be changed globally simply by modifying a single file. When referring to style sheets, the REL attribute has the STYLESHEET value. The TYPE attribute indicates that the style sheet is formatted as text and contains JavaScript source text. The RELand TYPE attributes combined tell us it is a JSS file. The HREFattribute points at the document containing the style sheet definition to be loaded at the point in the calling document. This a LINK object because it refers to a document that is accessed via a URL. The tag conveys no apparent visible effect on the document. It is considered to be an invisible tag. MSIE supports a LINKobject as a property of its styleSheet object. 1338

Leave a Reply