我有一個傳統的jsp頁面,它有按鈕元素。我正在使用框架集/框架。點擊這個按鈕函數parent.u8()被調用。 但只要我點擊按鈕,我得到以下錯誤javascript錯誤:權限被拒絕訪問屬性'u8'
Error: Permission denied to access property 'u8'
parent.u8()
它是一個大的jsp。所以我不想在這裏粘貼完整的內容。我試圖從服務器生成的html頁面 中獲取最小的html標記,並創建了具有類似結構的html頁面,它在那裏可以正常工作。但不是在實際應用中。
只是爲了獲得信息,還有一個iframe元素,但是它完全躺在單獨的框架中,而不是在按鈕存在的框架中(所以可能與iframe相關的東西看起來很暗淡)。 u8功能位於頂端標籤內。 鄉親我知道它很難說什麼都可以沒有實際的標記確切原因,但也許你可以幫 我關於可能的原因我什麼時候能拿到這種拒絕訪問屬性
更新錯誤時拋出許可的: -
這是以前的工作。當我開始在框架中使用tinymce(WYSIWYG)編輯器時,問題開始了.Tinymce創建了一個iframe元素,但僅從appserver加載。粘貼在其中一個框體內部生成的代碼下方。可以是它有助於
<span id="bodyTest_parent" class="mceEditor defaultSkin" role="application" aria-labelledby="bodyTest_voice">
<span id="bodyTest_voice" class="mceVoiceLabel" style="display:none;">Rich Text Area</span>
<table id="bodyTest_tbl" class="mceLayout" cellspacing="0" cellpadding="0" role="presentation" style="width: 100%; height: 323px;">
<tbody>
<tr class="mceFirst mceLast">
<td class="mceIframeContainer mceFirst mceLast">
<iframe id="bodyTest_ifr" frameborder="0" src="javascript:""" allowtransparency="true" title="Rich Text AreaPress ALT-F10 for toolbar. Press ALT-0 for help" style="width: 100%; height: 323px; display: block;">
<!DOCTYPE >
<html>
<head xmlns="http://www.w3.org/1999/xhtml">
<body id="tinymce" class="mceContentBody " onload="window.parent.tinyMCE.get('bodyTest').onLoad.dispatch();" spellcheck="false" dir="ltr">
<p>
<span color="blue" data-mce-style="color: blue;" style="color: blue;">
<strong>adain</strong>
</span>
頁面是否從與首頁相同的域加載到框架中? – Pointy
是它相同的域 – emilly
必須是相同的域(**完全**相同),相同的方案(「http」或「https」)和相同的端口號。 – Pointy