- 文件系统模块
- PhantomJS - 属性
- PhantomJS - 方法
- 系统模块
- PhantomJS - 属性
- Web 服务器模块
- PhantomJS - 属性
- PhantomJS - 方法
- 其他
- 命令行界面
- PhantomJS - 屏幕截图
- PhantomJS - 页面自动化
- PhantomJS - 网络监视
- PhantomJS - 测试
- PhantomJS - REPL
- PhantomJS - 示例
- PhantomJS 实用资源
- PhantomJS - 快速指南
- PhantomJS - 实用资源
- PhantomJS - 讨论
PhantomJS - frameUrl 属性
此属性将返回当前焦点帧的 URL。
语法
其语法如下所示 −
var wpage = require('webpage').create();
wpage.frameUrl;
示例
我们举个例子来了解如何使用 frameUrl 属性。
var wpage = require('webpage').create();
wpage.open('https:///tasks/content.html', function (status) {
console.log(status);
console.log(wpage.frameUrl);
phantom.exit();
});
以上程序生成以下输出。
success https:///tasks/content.html
phantomjs_webpage_module_properties.htm
广告