Тег <iframe></iframe>




Этот тег определяет встроенный фрейм.



Аргумент Значение
align absmiddle
baseline
bottom
left
middle
right
texttop
top
height pixel
name text
frameborder yes
no
sandbox allow-forms
allow-same-origin
allow-scripts
allow-top-navigation
seamless seamless
src URL
srcdoc HTML-code
width pixel




a.html
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>Name Page</title>
  •  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  • </head>
  • <body>
  •  <div>Hello World!</div>
  • <script>
  •  $(document).ready(function () {
  •   $("*").css("margin", "0").css("padding", "0");
  •   $("body").css("background-color", "#CCFFCC");
  •   $("div").css({ "width": "300px", "height": "300px", "position": "absolute", "top": "50%", "left": "50%", "margin-left": "-150px", "margin-top": "-150px", "text-align": "center", "line-height": "300px", "font-size": "36px" });
  •  });
  • </script>
  • </body>
  • </html>
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>Name Page</title>
  •  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
  • </head>
  • <body>
  •  <div>Hello World!</div>
  • <script>
  •  $(document).ready(function () {
  •   $("*").css("margin", "0").css("padding", "0");
  •   $("body").css("background-color", "#CCFFCC");
  •   $("div").css({ "width": "300px", "height": "300px", "position": "absolute", "top": "50%", "left": "50%", "margin-left": "-150px", "margin-top": "-150px", "text-align": "center", "line-height": "300px", "font-size": "36px" });
  •  });
  • </script>
  • </body>
  • </html>


index.html
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  • </head>
  • <body>
  •  <iframe src="a.html" width="300" height="300" frameborder="0"></iframe>
  • </body>
  • </html>
  • <!DOCTYPE html>
  • <html>
  • <head>
  •  <meta charset="utf-8" />
  •  <title>New Page</title>
  • </head>
  • <body>
  •  <iframe src="a.html" width="300" height="300" frameborder="0"></iframe>
  • </body>
  • </html>