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

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -