在以下網站運行(http://www.homefresh.co.nz/gallery.html)有一塊的JavaScript了頂級的動態改變我的iFrame的Javascript不在現場
Javascript語言,標題的高度:
<script type="text/javascript" language="javascript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=document.getElementById('the_iframe').contentWindow.document.body.scrollHeight;
//change the height of the iframe
var the_height = parseFloat(the_height) + 15;
document.getElementById('the_iframe').height=the_height;
}
//-->
</script>
,並在頁面的IFRAME代碼:
<iframe src="http://www.dpdesignz.co.nz/homefresh/" id="the_iframe" onLoad="calcHeight();" height="1" width="920px" scrolling="auto" frameBorder="0"></iframe>
除了一些原因,它沒有更新
我在這裏有完全相同的代碼,它的工作原理(http://www.dpdesignz.co.nz/homefresh/test.htm)
任何人都可以看到阻止它的任何東西嗎?
不安全的JavaScript嘗試從網址http://www.dpdesignz.co.nz/homefresh/訪問框架,網址爲http://www.homefresh.co.nz/gallery.html。域,協議和端口必須匹配。 gallery.html:192 Uncaught TypeError:無法讀取未定義的屬性'body'這是Chrome在打開資源標籤時所說的內容(按f12後 – 2012-08-08 09:02:51
而Mozilla Firefox說:[11:03:32,838]錯誤:權限被拒絕訪問財產'文件'@ http://www.homefresh.co.nz/gallery.html:192。 – Ricola3D 2012-08-08 09:05:09