审核专用
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

62 lines
2.2 KiB

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<!--
<script src="js/jquery.min.js"></script>
<script src="iframe-resizer-master/js/iframeResizer.min.js" type="text/javascript" ></script>
<script src="iframe-resizer-master/js/iframeResizer.contentWindow.min.js" type="text/javascript"></script>
-->
</head>
<body>
<!--
<script type="text/javascript">
iFrameResize({
log : true,
enablePublicMethods : true,
autoResize: true,
});
</script>
<iframe src="xiangbao/index.html" width="100%" scrolling="no" height="2560"></iframe>
-->
<iframe id="mainIframe" name="mainIframe" style="width: 100%;margin-top: -1%" frameborder="no" border="0" scrolling="no" src="xiangbao/index.html"></iframe>
<script language="javascript">
var timeIframe;
window.onload = function() {
timeIframe = setTimeout(GetIframeStatus, 10);
}
function GetIframeStatus() {
var iframe = document.getElementById("mainIframe");
var iframeWindow = iframe.contentWindow;
//内容是否加载完
try{
if (iframeWindow.document.readyState == "complete") {
var iframeWidth, iframeHeight;
//获取Iframe的内容实际宽度
iframeWidth = iframeWindow.document.documentElement.scrollWidth;
//获取Iframe的内容实际高度
iframeHeight = iframeWindow.document.documentElement.scrollHeight;
//设置Iframe的宽度
iframe.width = iframeWidth;
//设置Iframe的高度
iframe.height = iframeHeight + 100;
} else {
timeIframe = setTimeout(GetIframeStatus, 10);
}
}catch(exception){
iframe.width = 1920;
iframe.height = 3240;
}
}
</script>
</body>
</html>