title: Write javascript as innerHTML of document.getElementById function
body: <p>i dont know a lot of javascript but one thing ive realized is doing this</p>
  
  <pre><code>function example()
  {
  document.getElementById("example").innerHTML="&lt;script&gt;document.write(example)&lt;/script&gt;"
  }
  </code></pre>
  
  <p>doesnt work! i understand this but is there another way of doing this same thing that does work?</p>