Iframe a div from a website - Javascript jQuery

Javascript examples for jQuery:iframe

Description

Iframe a div from a website

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){/*from w  ww  .j  a  va2  s  .  c o  m*/
$(document).ready(function(){
    $("#ptContainer").load("http://java2s.com");
});
    });

      </script> 
 </head> 
 <body> 
  <div id="ptContainer">
    zz 
  </div> 
  <iframe src="http://java2s.com" width="300" height="300"></iframe>  
 </body>
</html>

Related Tutorials