小编kae*_*aes的帖子

如何在PhantomJS中使用iframe获取完整解释的html源代码

使用PhantomJS,我想打印像Firebug那样的网页的html源代码.用iframe解释.

var page = require('webpage').create();

page.open('http://google.com', function () {
  console.log(page.content);
  phantom.exit(); 
});
Run Code Online (Sandbox Code Playgroud)

这似乎只显示没有iframes html的解释HTML.并且使用评估无法帮助,因为我的iframe在另一个域中,所以我认为javascript无法访问它们.

html javascript iframe phantomjs

3
推荐指数
1
解决办法
7506
查看次数

标签 统计

html ×1

iframe ×1

javascript ×1

phantomjs ×1