applyElement Method

MS Office DHTML, HTML & CSS

 
Click to return to the DHTML, HTML & CSS home page    
appendChild Method     assign Method     DHTML Methods    

applyElement Method


Makes the element either a child or parent of the object.

Syntax

object.applyElement(oNewElement [, sWhere])

Parameters

oNewElementRequired. Object that becomes the child or parent of the object that invokes applyElement.
sWhere Optional. String that specifies one of the following values:
outsideDefault. Element becomes a parent of the object.
insideElement becomes a child of the object, but contains all children in the object.

Return Value

No return value.

Remarks

This method is accessible at run time. If elements are removed at run time, before the closing tag is parsed, areas of the document might not render.

Example

This example uses the applyElement method to apply the I element to an unordered list.

<SCRIPT>
function fnApply(){
   var oNewNode = document.createElement("I");
   oList.applyElement(oNewNode);
}
</SCRIPT>

<UL ID = oList>
<LI>List item 1
<LI>List item 2
<LI>List item 3
<LI>List item 4
</UL>

<INPUT
   TYPE="button"
   VALUE="Apply Element"
   onclick="fnApply()"
>

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BDO, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, custom, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, Hn, HR, HTML, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, KBD, LABEL, LEGEND, LI, LINK, LISTING, MAP, MARQUEE, MENU, NEXTID, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, XMP

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.