title: accessing a <table> of an iframe with jquery
body: <p>I have seen some articles about accessing the data inside the iframe,So i have in the page that is loading in the iframe a table like this: <code>&lt;table class="table"&gt;...&lt;/table&gt;</code></p>
  
  <p>so all i want to be displayed in that iframe is this table, <strong>without any headers or other divs or anything</strong></p>
  
  <p>How can i do this with jQuery ?</p>
  
  <p>UPDATE:</p>
  
  <p>the html code looks like this: i added the table inside a <code>&lt;div&gt;</code></p>
  
  <pre><code>&lt;div id="test"&gt;
  &lt;br&gt;
  &lt;table class="table"&gt;
  &lt;thead&gt;
  &lt;tr&gt;
  &lt;th&gt; ...... // and so on
  </code></pre>
  
  <p>SO, all i want to be displayed in that iframe is this div</p>
  
  <p>UPDATE for <strong>Adil</strong>:</p>
  
  <pre><code>$(window).load(function () {
          var filteredContents = $('.test').contents().find('.div_iframe').html();
          $('.test').contents().find('body').html(filteredContents);
  });
  </code></pre>
  
  <p>HTML looks like this:</p>
  
  <pre><code>&lt;iframe class="test" width="100%" height="100%" src="/message.html?msjId=268" style="height:100%;width:100%;"&gt;
  &lt;iframe class="test" width="100%" height="100%" src="/message.html?msjId=260" style="height:100%;width:100%;"&gt;
  </code></pre>
  
  <p>and the tables that should be displayed now, they should be two different tables, but at the moment is the same table for both <code>msjId</code> but duplicated from the first <code>msjId</code>...</p>