title: Error TypeError: document.getElementById(...) is null when add text innerHTML using javascript?
body: <pre><code>&lt;textarea name="widget-generalcode" cols="50" rows="13" id="widget-generalcode"&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>and javascript</p>
  
  <pre><code>&lt;script&gt;
  document.getElementById('widget-generalcode').innnerHTML = 'test';
  &lt;/script&gt;
  </code></pre>
  
  <p>When I run code, error <code>TypeError: document.getElementById(...) is null</code>, how to fix it ?</p>