title: Creating div on button click with Javascript not working?
body: <p>I have a button in a webpage that is linked to a Javascript function, which creates a div as follows:</p>
  <pre><code>function creatediv(){
     var div = document.createElement('div');
     div.innerHTML = document.getElementById('innerhtmlbox').value;
     document.body.appendChild(div);
  }
  </code></pre>
  <p>However, it is not working. Can anyone give me any advice?</p>