window.frames[] 和 document.getElementById('iframe') 到底获得的有何不同?

<iframe id="editoriframe" name="editor" height="200" width="200" scrolling="yes" frameborder="0"></iframe>

window.frames[0] 与 document.getElementById("editoriframe")

它们2个有何不同呢??

侃侃无极
浏览 544回答 2
2回答

达令说

写法不同而已,建议不要用索引,这样如果文档结构变化要改索引
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript