- 檔案系統模組
- PhantomJS - 屬性
- PhantomJS - 方法
- 系統模組
- PhantomJS - 屬性
- Web 伺服器模組
- PhantomJS - 屬性
- PhantomJS - 方法
- 其他
- 命令列介面
- PhantomJS - 螢幕截圖
- PhantomJS - 頁面自動化
- PhantomJS - 網路監控
- PhantomJS - 測試
- REPL 互動式介面
- PhantomJS - 示例
- PhantomJS 有用資源
- PhantomJS - 快速指南
- PhantomJS - 有用資源
- PhantomJS - 討論
PhantomsJS - title 屬性
此屬性返回您正在閱讀的頁面的標題。
語法
其語法如下所示 −
var wpage = require('webpage').create();
wpage.title;
示例
以下示例展示了 title 屬性的用法。
var wpage = require('webpage').create();
wpage.open('https:///tasks/ptitle.html', function (status) {
console.log(wpage.title);
phantom.exit();
});
上述程式生成以下 輸出 。
Testing PhantomJs
phantomjs_webpage_module_properties.htm
廣告