I would like to change the context of the javascript executed in the webkit developer tool/firebug console to execute its code like it is running from inside an iframe on the page.

我想改变在webkit开发人员工具/ firebug控制台中执行的javascript的上下文来执行它的代码,就像它从页面上的iframe内部运行一样。

I know I could do this by opening the page in the iframe on a separate page, but I want to run code where it interacts with the parent frame.

我知道我可以通过在单独的页面上打开iframe中的页面来实现这一点,但我希望在与父框架交互的地方运行代码。

6 个解决方案

#1


129

Chrome 15 allows you to change the scope of the console. On the bottom of the console, next to the clear console button, there is a menu that says <top frame> which will give a list of available frames:

Chrome 15允许您更改控制台的范围。在控制台的底部,在清除控制台按钮旁边,有一个菜单显示 ,它将提供可用框架的列表:

Firefox has a similar feature currently in development:

Firefox目前正在开发类似的功能:


You can also navigate across frames using the command line:

您还可以使用命令行在框架中导航:

var frame = document.getElementById("frame1").contentWindow;
cd(frame);

更多相关文章

  1. 控制台在node . js中没有“debug”方法吗?
  2. Bottle 框架源码学习 四
  3. 在CentOS 6.3 64bit上搭建python高性能框架gevent开发环境
  4. Scrapy框架--Requests对象
  5. IIS 部署 python web框架 Flask
  6. Python第十天 print >> f,和fd.write()的区别 stdout的buffer 标
  7. 基于scrapy框架的关于58同城招聘网站信息的爬取
  8. python3编写网络爬虫21-scrapy框架的使用
  9. python 之 自制测试框架

随机推荐

  1. EditText使用小结
  2. android broadcastReceiver生命周期及两
  3. android 属性
  4. Android 神兵利器Dagger2使用详解(二)Modul
  5. 【Android开发学习27】界面控件之进度条(
  6. Android读书笔记(11)—— Android的线程和
  7. Listview
  8. android横竖屏切换的一点感想
  9. jdk及android studio环境变量配置
  10. Android访问资源与属性之 ? , @