第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

在iframe1中如何獲得iframe2的引用?(急)

在iframe1中如何獲得iframe2的引用?(急)

達(dá)令說(shuō) 2018-12-07 04:45:07
在框架中點(diǎn)擊iframe1中的鏈接,要改變iframe2中的內(nèi)容!改怎么做?最好有代碼!
查看完整描述

2 回答

?
桃花長(zhǎng)相依

TA貢獻(xiàn)1860條經(jīng)驗(yàn) 獲得超8個(gè)贊

a.html:

?

<html>
<body>
<script type="text/javascript">
function show()
{
alert(document.getElementById("frame2").src);
}
</script>
<iframe name="frame2" id="frame2" ?src="ab.html"></iframe>
<iframe name="frame3" id="frame3" ?src="axx.html"></iframe>
<button onclick="show()">測(cè)試</button>
</body>
</html>

<html>
<body>

<script type="text/javascript">

function show(){ alert(document.getElementById("frame2").src);}

</script>
<iframe name="frame2" id="frame2" ?src="ab.html"></iframe>

<iframe name="frame3" id="frame3" ?src="axx.html"></iframe>
<button onclick="show()">測(cè)試</button>

</body>

</html>

ab.html:

<html>

<body>

<script type="text/javascript">

function show()

{

alert(parent.document.getElementById("frame2").src);

}

</script>

<button onclick="show()">測(cè)試</button>

</body>

</html>


查看完整回答
反對(duì) 回復(fù) 2019-01-21
?
Qyouu

TA貢獻(xiàn)1786條經(jīng)驗(yàn) 獲得超11個(gè)贊

在iframe1中使用parent來(lái)獲取父頁(yè)面的iframe2。

查看完整回答
反對(duì) 回復(fù) 2019-01-21
  • 2 回答
  • 0 關(guān)注
  • 396 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)