title: How to insert text in a td with id, using JavaScript
body: <p>I know it may be a simple thing, but I can't figure out. I am trying to insert some text coming from a JavaScript function onload event into a td.</p>
  
  <pre><code>&lt;html&gt;
   &lt;head&gt;
    &lt;script type="text/javascript"&gt;
     function insertText ()
     {
         //function to insert any text on the td with id "td1"
     }
    &lt;/script&gt;
   &lt;/head&gt;
   &lt;body onload="javascript:insertText()"&gt;
    &lt;table&gt;
     &lt;tr&gt;
      &lt;td id="td1"&gt;
      &lt;/td&gt;
     &lt;/tr&gt;
    &lt;/table&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Any help?</p>