This is how you can do it in javascript:
<script>
(function(){
var divContent= document.getElementById("text-1").html(); //get div content
document.getElementsByTagName("body").append(divContent); //add it to the body
})();
</script>
More Related Contents:
- How to send data to the server via Ajax?
- jQuery append function is just appending the html but not the classes related to it
- How to hide css and js version details from weppalyzer in PHP
- My games being hacked easily by right click inspect. How can i prevent this?
- Displaying selected dropdown option [closed]
- HTML: how refresh information in [closed]
- How could I make a calendar? [closed]
- Download the text over image using jquery
- HTML Form Submit pass array to PHP [closed]
- Dynamic page load can’t load Java with page
- JavaScript does not fire after appending [duplicate]
- “Mixed content blocked” when running an HTTP AJAX operation in an HTTPS page
- How to prevent page from reloading after form submit – JQuery
- How to convert HTML to JSON using PHP?
- how to assign javascript variable value to php variable
- How to replace html element with ajax response?
- html download attribute redirects to url instead of downloading
- Passing JSON data from php to html-data attribute and then to Javascript
- How do I edit PHP variable with JavaScript/jQuery?
- How do I refresh a DIV content?
- Remove everything within script and style tags
- How to replace the entire html webpage with ajax response?
- How to perform a real time search and filter on a HTML table
- Jquery Event won’t fire after ajax call
- How to get all selected values from ?
- Set content of iframe
- How To Show And Hide Input Fields Based On Radio Button Selection
- Javascript function post and call php script
- Onclick reload the div only
- How to highlight a part part of an Input text field in HTML using Javascript or JQuery