利用 iframe将其他网站 某一个部分的内容 嵌入到 自己的网站中

发布时间 2023-08-08 21:30:33作者: ministep88

[利用 iframe将其他网站 某一个部分的内容 嵌入到 自己的网站中_iframe嵌入网页的一部分_奔跑的长毛象的博客-CSDN博客](https://blog.csdn.net/weixin_42654817/article/details/83141889)

 

```h5

<!DOCTYPE html>
<html>
<head>
      <title>Hello World</title>
      <style>
      .f1{height:485px; overflow: hidden;}
.f2{height:885px; overflow: hidden;}
#frame1{position:absolute; top:-355px;left:0; transform:scale(0.9); z-index:1}
#frame2{position:relative; top:-285px;left:0;  z-index: 1}
   </style>
  </head>
<body>

<h1>JavaScript 数组</h1>

<p>Array.splice() 方法添加数组元素:</p>

<p id="demo"></p>

   
   <div class="row">

   <div class="col-xs-6 f2 hidden-xs hidden-md clear">
       <iframe id="frame2" frameborder=0 width=960 height=2050 marginheight=0 scrolling=no src="https://juejin.cn/"></iframe>
   </div>
</div>
   
<script>
const fruits = ["Banana", "Orange", "Apple", "Mango"];
//   <div class="col-xs-6 f1">
//     <iframe id="frame1" frameborder=0 width=960 height=1200  marginheight=0 marginwidth=0 scrolling=no src="https://juejin.cn/" ></iframe>
//   </div>
// <embed type="text/x-scriptlet" src="https://juejin.cn/" width="840" height="480">
// 在位置 2,添加 2 个元素:
fruits.splice(2, 0, "Lemon", "Kiwi");

document.getElementById("demo").innerHTML = fruits;
</script>

</body>
</html>

````