您的位置:首页 > 其它

页面中iframe中嵌入一个跨域的页面,让这个页面按照嵌入的页面宽高大小显示的方式;iframe嵌套的页面不可以编辑的问题解决方案

2016-07-12 20:39 597 查看
<html>
<head>
<style>
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
overflow: hidden;
}
</style>
</head>
<body>
<iframe src="http://gongkai.kaipuyun.cn/databaseInfo/index" width='100%' height='100%' frameborder='0' name="_blank " id="_blank "></iframe>
</body>
</html>
效果图:



当发现一个iframe嵌套的页面不可以编辑的时候,解决办法是:
<html>
<head>

</head>
<body>
<iframe src=""001.htm"" id=""SendMsg"" width=""100%"" height=""120px"" ></iframe>
<script>
document.getElementById(""SendMsg"").contentWindow.document.body.contentEditable= "true";
</script>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: