比如,http://reg.163.com/这个网址,我们要在console中切换到loginByAccount这个iframe进行调试,应该怎么做呢?幸好firebug提供了cd(window)这个功能,具体查看https://getfirebug.com/wiki/index.php/Cd
具体操作如下:
首先:切换到所在iframe:
cd($$("#if-lg>iframe")[0].contentWindow);
然后对邮箱进行赋值:document.getElementById("auto-id-1466494995254").value="[email protected]";
效果如下: