<div id='div'></div> <script> var a,b,c,d; function a() { } a = {} b = [] document.getElementById('div').innerHTML = document.getElementsByTagName('script')[0].innerHTML </script>