When the element is applied, you must specify the element object to which it is to become attached.
There is an optional second parameter to define whether it should become the parent or the child of that object. If the second parameter is not specified, then the element becomes the parent of the target object.
The second parameter can be any of these values:
outside
inside
Although this can be used at runtime when the page is being constructed, any removal of elements during this process may leave the page in a state where it cannot be properly rendered.
See also: | Function.apply() |
Prev | Home | Next |
Element.all[] | Up | Element.attributes[] |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |