[英]SelectionContext in iFrame - Permission denied to access property ‘getSelection’
[英]Permission denied to access property in IFRAME
我的 jsp 頁面中有一個鏈接。
鏈接看起來像這樣
<a href="javascript:doSomething('abc.ff' , 'abc.ff?m=1')">
javascript 代碼
function doSomething(url, url_progress){
parent.win1.location.href = url;
/* Wait until something surely has started! */
window.setTimeout("this.startFinally()", 1000);
this.startFinally = function (){
location.href = url_progress;
}
}
當用戶點擊這個叮當聲時,一切正常。 現在最近我把這段代碼放在 Iframe 中,然后什么也沒有發生。 我檢查了螢火蟲並得到了這個錯誤:
Permission denied to access property 'win1'
[Break On This Error] parent.win1.location.href = url;
可能是什么問題?
可能是相同的來源政策生效。所有東西都是從同一個主機/端口提供的嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.