39 lines
1.6 KiB
Plaintext
39 lines
1.6 KiB
Plaintext
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="_3DLook.ascx.cs" Inherits="FineUIPro.Web.Controls._3DLook" %>
|
|
<iframe frameborder="0" id="receiverIframe" name="receiverIframe" scrolling="auto" width="100%" onLoad="iFrameHeight()" ></iframe>
|
|
<p id="prompt" hidden="hidden" ></p>
|
|
<script type="text/javascript">
|
|
var receiver = document.getElementById('receiverIframe');// net平台
|
|
var promptid = document.getElementById('prompt');// net平台
|
|
|
|
function Bindiframe(url, Height, Width) {
|
|
if (url == "") {
|
|
receiver.hidden = true;
|
|
promptid.hidden = false;
|
|
promptid.innerHTML = "未配置地址,请到设置=>项目环境设置中配置AVEVA NET 地址";
|
|
promptid.style.fontWeight = "bold";
|
|
promptid.style.fontSize = "larger";
|
|
} else {
|
|
receiver.src = url;
|
|
|
|
}
|
|
//receiver.width = $(window).width;
|
|
//receiver.Height = Width;
|
|
}
|
|
function BindData(dataList, Url_item,Url) {
|
|
receiver.src = Url_item;
|
|
// var newdatalist = dataList.split(",");
|
|
console.log(dataList);
|
|
receiver.contentWindow.postMessage(dataList, Url);
|
|
}
|
|
function iFrameHeight() {
|
|
var ifm = document.getElementById("receiverIframe");
|
|
var subWeb = document.frames ? document.frames["receiverIframe"].document : ifm.contentDocument;
|
|
if (ifm != null && subWeb != null) {
|
|
// ifm.height = subWeb.body.scrollHeight;
|
|
ifm.height = document.documentElement.clientHeight;
|
|
//console.log(ifm.height);
|
|
//console.log(document.documentElement.clientHeight);
|
|
}
|
|
}
|
|
</script>
|