title: How to remove tag from html with JavaScript in iphone UIWebView
body: <p>Guys i have a html string like below;</p>
  
  <pre><code>&lt;html&gt;
     &lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;/head&gt;
     &lt;body&gt;i wanna remove &lt;span name="Note"&gt;this&lt;/span&gt; tag&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>i use this javascript code:</p>
  
  <pre><code>NSString *str = @"function f(){
     var nodes = document.getElementsByName('Note');
     alert(nodes.length); // it returns node count correctly
     for(var i = nodes.length - 1;i &gt;= 0;i--){
         var node = nodes[i];
         if (node){
           node.parentNode.removeChild(node);
         }
     }
  }f();";
  
  [UIWebView stringByEvaluatingJavaScriptFromString:str];
  </code></pre>
  
  <p>result is : </p>
  
  <pre><code>&lt;html&gt;
     &lt;head&gt;&lt;title&gt;&lt;/title&gt;&lt;/head&gt;
     &lt;body&gt;i wanna remove tag&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>how can i remove only tag?</p>