close

若網頁中的頁面本身有iframe,而你在父網頁,想呼叫子網頁底下的javascript時可用contentWindow去呼叫

ex.

parent.document.getElementById("left").contentWindow.functionName();

 

若是子網頁要呼叫父網頁則直接用top或parent

ex.

parent.functionName();

arrow
arrow
    文章標籤
    javascript iframe
    全站熱搜

    ixdezive19 發表在 痞客邦 留言(0) 人氣()