title: How to insert html content in body part using javascript
body: <p>I am trying to insert string inside body part of my html document using javascipt. The string which i want to insert contains some script tags also. For example :</p>
  
  <pre><code>  var str = "&lt;div&gt; some text &lt;/div&gt;
               &lt;script src='/Scripts/jquery-1.7.2.js' type='text/javascript'&gt;&lt;/script&gt;";
  </code></pre>
  
  <p>Now when i insert the above string using jquery , like :</p>
  
  <pre><code> $('body').html(str);
  </code></pre>
  
  <p>It will insert the string and load the jquery also. But when i insert this string using javascript, like :</p>
  
  <pre><code>document.getElementsByTagName('body')[0].innerHTML = str;
  </code></pre>
  
  <p>This will not load the jquery script in the browser. Can anyone tell me how can i achieve the same using javascript ?                          </p>