title: How to load iFrame in div by AJAX
body: <p>I want load an iFrame in my <code>div</code> by AJAX. How can I do it?</p>
  <pre class="lang-html prettyprint-override"><code>&lt;button id=&quot;iframeload&quot;&gt;Load Iframe&lt;/button&gt;
  &lt;div id=&quot;iframe_content&quot;&gt;&lt;/div&gt;
  
  &lt;script src=&quot;http://code.jquery.com/jquery-1.12.4.min.js&quot;&gt;&lt;/script&gt;
  
  &lt;script type=&quot;text/javascript&quot;&gt;
      $('.iframeload').click(function(event) {
        event.preventDefault();
        event.stopImmediatePropagation();
        $.ajax({
            type: &quot;POST&quot;, 
            url : &quot;https://pecom.ru/ru/calc/?iframe=Y&quot;,
            success : function (data) {  
                // alert('ok');
                $(&quot;#iframe_content&quot;).html(data); 
            }
        });
    });
  &lt;/script&gt;
  </code></pre>
  <p>This is the iFrame</p>
  <pre class="lang-html prettyprint-override"><code>&lt;iframe id=&quot;pecom-kabinet-iframe&quot; allowtransparency=&quot;true&quot; frameborder=&quot;0&quot; width=&quot;800&quot; height=&quot;1800&quot; scrolling=&quot;auto&quot; style=&quot;border: 0;&quot; src=&quot;https://pecom.ru/ru/calc/?iframe=Y&quot;&gt;Not supported browser&lt; / iframe &gt;
  </code></pre>
  <p>ANd the button <code>#iframeload</code> does not work...</p>