- 檔案系統模組
- PhantomJS - 屬性
- PhantomJS - 方法
- 系統模組
- PhantomJS - 屬性
- Web 伺服器模組
- PhantomJS - 屬性
- PhantomJS - 方法
- 其他
- 命令列介面
- PhantomJS - 螢幕捕獲
- PhantomJS - 網頁自動化
- PhantomJS - 網路監控
- PhantomJS - 測試
- PhantomJS - REPL
- PhantomJS - 示例
- PhantomJS 有用資源
- PhantomJS - 快速指南
- PhantomJS - 有用資源
- PhantomJS - 討論
PhantomJS - onLoadFinished()
開啟頁面完全載入後呼叫此函式。它有一個引數,表示載入是成功還是失敗。
語法
它的語法如下 -
wpage.onLoadFinished = function(status) {}
例子
var wpage = require('webpage').create();
wpage.onLoadFinished = function(str) {
console.log(str);
console.log('File is Loaded');
}
wpage.open("https:///tasks/file.html", function(status) {
});
上述程式生成了以下輸出。
success File is Loaded
phantomjs_webpage_module_events_callbacks.htm
廣告