- 檔案系統模組
- 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
廣告