<div id="test">Test</div> <script> document.getElementById('test').innerHTML = test;</script>
<div id="test">Test</div> <script> test.innerHTML = 'Hi';</script>