Putting DIV wrapper around all code in body



I need to put all body content into wrapper when page is loaded. Via
javascript of course.

Initial DOM

<body>
<div>
<p>Some text</p>
<p>More text</p>
</div>
</body>

Modified DOM with javascript


<body>
<div id="myWrapper">
<div>
<p>Some text</p>
<p>More text</p>
</div>
<div>
</body>

Any idea?
.



Relevant Pages

  • passing parameter problems
    ... I'm designing a website in dreamweaver and I'm using JavaScript to ... The text is contained in <div> tags. ... The following set up works fine, calling moveParas which moves two div ...
    (comp.lang.javascript)
  • Re: Hide/Show Selection List
    ... A div is a BLOCK element, meaning that is rectangle with some content. ... a SPAN is an inline element, eg a part of a sentence. ... For span you should use inline. ... you are using a suspect/bad way to invoke a javascript function. ...
    (comp.lang.javascript)
  • Re: viewable coordinates of an element
    ... javascript and web design as a whole, ... Is there a way to like when i scroll the DIV to this element, ...
    (comp.lang.javascript)
  • cant set mouse cursor
    ... I'm writing a panoramic image viewer in javascript. ... (which covers the same area as the div), ... The html is ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: Updating a div with a block of javascript and causing reexecution of this javascript block?
    ... Simply dynamically creating a 'wrapper' div, and replacing this wrapper, ... Apple recommend to use a Javascript call to generate the OBJECT tag ... I am storing String entries representing the innerHTML of a div that I ...
    (comp.lang.javascript)