krot

iframe с динамической высотой

Aug 4th, 2016
74
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2. $(function() {
  3.     var iframe = $('#ourframe', parent.document.body);
  4.     iframe.height($(document.body).height());
  5. });
  6. </script>
  7.  
  8. <html>
  9.     <body>
  10.         <iframe id="ourframe"></iframe>
  11.     </body>
  12. </html>
RAW Paste Data