1
我使用以下來發布信息,並且當我創建表單元素時,我得到一個異常:「權限被拒絕」。嘗試將信息發佈到某個其他頁面時,權限被拒絕?
var newWindow = window.open('', '_blank', 'alwaysRaised=yes,toolbars=no, menubar=no, location=no, scrollbars=yes, resizable=yes, status=yes,left=10000, top=10000, width=10, height=10, visible=none', '');
var tempFormElement = newWindow.document.createElement('form');
tempFormElement.method = 'post';
tempFormElement.action = urlToOpen;
var tempInputElement;
tempInputElement = newWindow.document.createElement('input');
tempInputElement.setAttribute('TPLInfo', JSON.stringify(linkageInfo));
tempFormElement.appendChild(tempInputElement);
tempFormElement.submit();
newWindow.document.body.removeChild(tempFormElement);
newWindow.close();
請建議。
@mplungjan - 有什麼你可以設置該項行動(雖然它可能會導致最後兩行的問題)沒有任何限制,而OP說的錯誤是在此之前,兩行反正。 – Quentin
在爲缺少的變量添加數據後,我無法重現該問題。唯一的錯誤是試圖從body刪除tempFormElement(因爲你從未將它添加到body)。 – Quentin
您可以在網絡服務器上打開一個小於10px的pos 10000窗口? – mplungjan