PhantomJS onLoadStarted()

PhantomJS onLoadStarted()

该回调在网页开始加载时被调用。

语法

其语法如下所示 −

wpage.onLoadStarted = function() {}

示例

var wpage = require('webpage').create();
wpage.onLoadStarted = function() {
   console.log('File has started Loading');
} 
wpage.open("http://localhost/tasks/file.html", function(status) {
   console.log(status);
});

上述程序生成以下 输出

File has started Loading
Success

Python教程

Java教程

Web教程

数据库教程

图形图像教程

大数据教程

开发工具教程

计算机教程