aspxtreme

applyElement Method

DHTML Methods


Applies an element to another element.

Syntax


oTarget.applyElement ( oNewElement ) 
Parameters

oTarget Required. An element that is applied with oNewElement.
oNewElement Required. An element that is applied to oTarget.

Return Value

No return value.

Remarks

The applyElement method applies one element to a target element by making the target a child of the new element.

Example

The following sample demonstrates the use of the applyElement method to apply the I object to an unordered list.

<script language="JavaScript">
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 ( ) ">


Books and more ...

Contents
HTML Elements / DOM Objects
HTML Element Attributes
CSS Attributes
DOM Object Properties
DOM-compliant Events Reference
DOM Methods Reference
DOM Collections Reference
 


Suggested Reading



Previous page Back to top Next page

Check out related books at Amazon

© 2000-2008 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support aspxtreme