title: UIWebView: get the contents of the <BODY> tag
body: <p>I initialize a UIWebView as follows:</p>
  
  <pre><code>NSString *msg = &lt;HTML&gt;&lt;BODY bgcolor=\"#504a4b\" style=\"font-family:Verdana; font-size:20\" &gt; &lt;B&gt; No Messages";
  [webviewMessageLog loadHTMLString:msg baseURL:NULL];
  </code></pre>
  
  <p>which shows the text exactly as I expect. Later, I want to append to this log. As a test, I did:</p>
  
  <pre><code>-(void)webViewDidFinishLoad:(UIWebView *)webView
  {
      NSString *oldHTML = [webviewMessageLog stringByEvaluatingJavaScriptFromString:@"document.body.innerHTML"];
      NSLog(@"%@", oldHTML);
  </code></pre>
  
  <p>this returns the HTML starting after the  tag, like such:</p>
  
  <pre><code> &lt;b&gt; No Messages&lt;/b&gt;
  </code></pre>
  
  <p><strong>My question is:</strong> what javascript object do I need to read to see the parameters I set within the BODY tag? How would I see the font-family and bgcolor items that were previously set? I want to maintain whatever formatting had been set elsewhere, and I'm hoping to just read the prior BODY tag and avoid additional code to re-evaluate what the BODY tag should include.</p>
  
  <p>Thanks!</p>