如何使用document.getElementById在iframe中選擇元素我iframe喜歡這個<iframe name="myframe1" id="myframe1" width="100%" height="100%" src="a.html"><html>
<head></head>
<frameset name="myframe2" cols="0%, 100%" border="0" frameBorder="0" frameSpacing="0">
<frame name="page1" src="c.html" scrolling="no"></frame>
<frame name="page2" src="d.html" >
<html>
<head></head>
<body id="top">
<div id="div1">
<div id="div2">
<div id="div3">
<ul id="x">
<li>a</li>
<li>b</li>
</ul>
</div>
</div>
</div>
</body>
</html>
</frame>
</frameset></html></iframe>我想引用元素“x”。我嘗試了幾種方法,但我找不到解決方案。
如何使用document.getElementById在iframe中選擇元素
大話西游666
2019-08-27 16:56:21