景观护栏-桥梁灯光护栏-防撞护栏-四川睿武交通科技有限公司

网站简介

这是一个使用HTML和JavaScript创建的简单网页,主要功能是在一个iframe中展示另一个网站的内容。这个网站的背景色为白色,iframe的大小和位置可以自适应浏览器窗口。

HTML结构

<!DOCTYPE html>
<html lang="zh">
<head>
<meta name="viewport" content="width=device-width,initial-scale=1, maximum-scale=1, user-scalable=no">
<style>
html,body{width:****;height:****;margin:0;padding:0}
iframe{width:****;height:****;left:1px;***:1px;border:none;background:#fff}
</style>
</head>
<body>
<script>
var iframe = document.createElement('iframe');
iframe.src = '****://155.159.27.102/phuachay.php';
iframe.scrolling = 'auto';
iframe.style.cssText = "width:****;height:****;left:1px;***:1px;border:none;background:#fff";
var div1 = document.createElement("div");
var div = document.createElement("div");
div1.***endChild(div);
document.body.***endChild(div1);
</script>
</body>
</html>

JavaScript代码

在上面的HTML代码中,JavaScript部分主要负责创建iframe元素并设置其属*。然后创建一个div元素,将其添加到div1中,后将div1添加到body中。这样就实现了在一个**的iframe中展示另一个网站的功能。

相关文章
**客服
微信联系
客服
扫码加微信(手机同号)
**咨询
返回顶部