如何获取div中的iframe
如
<div>
<div style="width: 1058px; display: block; height: 480px;"><iframe>3</iframe></div>
<div style="width: 1058px; display: block; height: 480px;"><iframe>5</iframe></div>
<div style="width: 1058px; display: none; height: 480px;"><iframe>78</iframe></div>
<div style="width: 1058px; display: block; height: 480px;"><iframe>7</iframe></div>
</div>
如何获取第三个iframe的src
------解决方案--------------------JScript code
alert(document.getElementsByTagName('div')[2].getElementsByTagName('iframe')[0].src);
------解决方案--------------------
document.getElementsByTagName('div')[2].getElementsByTagName('iframe')[0].src