var
Loader =
new
function
(){
var
doc = document,body = doc.body,
self =
this
,
getRequest =
function
(name) {
var
reg =
new
RegExp(
"(^|&)"
+ name +
"=([^&]*)(&|$)"
,
"i"
),
r = window.location.search.substr(1).match(reg);
return
(r!=
null
)? unescape(r[2]) :
null
;
},
getConfig =
function
(){
var
scripts = doc.getElementsByTagName(
'script'
),
script = scripts[scripts.length - 1];
return
function
(param){
var
p = script.getAttribute(param);
return
p? p : getRequest(param);
};
}(),
proxyheight = 0,
frameid = getConfig(
"data-frameid"
),
timer = getConfig(
"data-timer"
),
getProxyuUrl = getConfig(
"data-proxy"
),
proxyframe =
function
(){
var
el = doc.createElement(
"iframe"
);
el.style.display =
"none"
;
el.name=
"proxy"
;
return
el;
}();
this
.resize =
function
(){
proxyheight = body.offsetHeight;
proxyframe.src = getProxyuUrl +
"?data-frameid="
+ frameid+
"&data-frameheight="
+ (proxyheight+40);
}
this
.init =
function
(){
var
init =
function
(){
body.appendChild(proxyframe);
self.resize();
if
(!isNaN(timer)){
timer = timer<500?500:timer;
window.setInterval(
function
(){
if
(body.offsetHeight != proxyheight){
self.resize();
}
},timer);
};
};
if
(doc.addEventListener){
window.addEventListener(
"load"
,init,
false
);
}
else
{
window.attachEvent(
"onload"
,init);
}
}
};
Loader.init();
相关推荐
完美解决跨域iframe的高度自适应,完美解决跨子域iframe的高度自适应,嵌入几个页面解决跨域iframe的高度自适应。。。
iframe 跨域 自适应高度 模板 iframe 跨域 自适应高度 模板 iframe 跨域 自适应高度 模板
iframe跨域嵌套自适应高度 iframe跨域嵌套 丢失session值(针对嵌套asp.net 做的网站)
可以实现Iframe跨域自适应高度 main.htm和agent.htm文件放在www.a.com域内 iframe.htm放在www.b.com域内 这样就可以通过a.com域中的main.htm文件访问b.com域中的iframe.htm文件了
解决vue $http的get和post请求跨域问题 vue $http的get和post请求跨域问题 首先在config/index.js中配置proxyTable proxyTable: { '/api':{ // target:'http://jsonplaceholder.typicode.com', target:'...
这个库允许的高度与同跨域iframe来适应他们所包含的内容的宽度自动调整大小。它最常见的问题与使用iframes提供一系列的功能,其中包括: 高度和宽度大小的iframe内容大小。 作品以多个嵌套的iframe。 跨域iframe域...
www.baidu.com,假设地址:http://www.baidu.com/b.html 实现效果: A域名下的页面a.html中通过iframe嵌入B域名下的页面b.html,由于b.html的宽度和高度是不可预知而且会变化的,所以需要a.html中的iframe自适应大小....
有个在线例子,访问地址:http://okiner.cn/demo/cross-domain/iframe.html,这是源码,方便下载
有个在线例子,访问地址:http://okiner.cn/demo/cross-domain/iframe.html,这是源码,方便下载
由于flashplayer9 升级了安全策略问题,所以需要保证所有的的文件(包括,swfoto.swf,图片文件)都必须在统一域名下,不能在跨域读取图片了 <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ...
iframe 跨域 自动适应高度;iframe 跨域 自动适应高度;
iframe跨域问题:Uncaught DOMException Blocked a frame with origin解决方法
这是关于iframe使用过程中出现的问题整理的解决方法,关于使用iframe不用单独写接口打通数据,直接把数据通过ifarme嵌套方法传递过去,使用简单方便。
链接:https://pan.baidu.com/s/1-mjkHmiuVLJzmqhnIyBHag 提取码:w9vu
介绍: 填写的嵌入地址一定要和本页面在同一个站点上,否则会提示“拒绝访问!”。对跨域引用有权限问题,请查阅其他资料。
1- 安装lombok插件 ## mysql - 下载地址:https://dev.mysql.com/downloads/mysql/5.7.html#downloads ... http://www.yjlive.cn:8090/#/home https://gitee.com/zscat-platform/mall/wikis/pages 645
NULL 博文链接:https://hqlly.iteye.com/blog/1662337
具体情况有: 一、本域和子域的相互访问: http://www.aa.com/和book.aa.com 二、本域和其他域的相互访问: http://www.aa.com/和http://www.bb.com/ 用 iframe 三、本域和其他域的相互访问: http://www.aa.com/和...
购买商业版: http://market.zhenzikj.com/detail/82.html帮助文档:https://www.kancloud.cn/crmeb/crmeb/662420CRMEB微信小程序商城系统,基于CRMEB系统开发的一套电商系统,带优惠券、积分、秒杀、拼团、砍价、...
NULL 博文链接:https://cjb.iteye.com/blog/406466