asp.net.ph

Skip Navigation Links

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 ( ) ">


© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

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