Javascript examples for DOM HTML Element:Div
Get content of a DIV using JavaScript
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {/*from w w w . ja v a2s . c o m*/ var MyDiv1 = document.getElementById('DIV1'); var MyDiv2 = document.getElementById('DIV2'); MyDiv2.innerHTML = MyDiv1.innerHTML; }); </script> </head> <body> <div id="DIV1"> Blah blah. </div> <div id="DIV2"> </div> </body> </html>