首页 > 解决方案 > Firefox console getElementBy doesn't work

问题描述

Can someone tell me why when i run

document.getElementsByTagName('img')[0]

in chrome's console shows what I want and doing the same on firefox does not?

标签: google-chromefirefox

解决方案


After some research I found out I was doing it totally wrong as I would have to load the iframe first and then access it. I wrongly thought that this would be done automatically by the browser.


推荐阅读