Anonymous web server - CD-197Appendix F . Examples from Parts III and
Sunday, September 30th, 2007CD-197Appendix F . Examples from Parts III and IV Now, insert this element before the start of the myPobject: myP.insertAdjacentElement( beforeBegin , a) Notice that you have not assigned an idproperty value to the new element. But because the element was inserted by reference, you can modify the inserted object by changing the object stored in the avariable: a.style.color = red The inserted element is also part of the document hierarchy, so you can access it through hierarchy references such as myP.previousSibling. The parent element of the newly inserted element is the BODY. Thus, you can inspect the current state of the HTML for the rendered page by entering the following statement into the topmost text box: document.body.innerHTML If you scroll down past the first form, you can find the