1 2 3 4 5 6 7 8 9
<h2>name</h2> <div id="window_name"></div> <script> document.querySelector("#window_name").textContent = window.name; </script>