javascript - Move element before the end of BODY -


is there way place html element before body end tag, without knowing tags before it? in scenario don't know there ul list @ end.

note: can't use jquery solve this.

e.g.

<body>    <p id="test">hello</p>     <script>        document.getelementbyid("test").move_before_body();   //<--    </script>     <ul>      <li>...</li>      <li>some random stuff</li>    </ul>    <!-- element should moved position --> </body> 

someelement.appendchild move element end of someelement.

document.body.appendchild(     document.getelementbyid("test") ); 

Comments

Popular posts from this blog

testing - Detect whether test has failed within fixture -

android - Create single AAR file from multiple modules using Gradle -

AbotX : How do you create a parallel crawler that stays on and can be added to at run time from new requests -