【发布时间】:2011-04-18 17:03:49
【问题描述】:
我在 String(u).indexOf() 上收到一个错误,说访问拒绝 http 到 https...所以我认为这不起作用。但也许我错过了什么。
这是在同一个域上,只是协议不同。
function process_form(f){
var l = $("iframe#loginFrame");
if(l.length==0){
f.attr("target","loginFrame");
$('<iframe src="/player.htm?ajax=1"'+(!_DBG?' class="hide"':'')+' id="loginFrame" name="loginFrame"></iframe>').prependTo('body');
$("iframe#loginFrame").load(function() {
var u = this.contentWindow.location;
if(String(u).indexOf("confirm")>=0){
change_form(1);
}else if(u!=this.src){
change_form(0);
}
log(u);
log(this.src);
});
}else{
warn("Frame already exists!");
}
change_form(-1);
setTimeout(function(){ f.submit();},500);
log(f);
}
【问题讨论】:
标签: javascript iframe https