PhantomJS frameUrl 属性 该属性将返回当前聚焦框架的URL。 语法 其语法如下: var wpage = require('webpage').create(); wpage.frameUrl;JavaScriptCopy 示例 让我们举个示例来理解 frameUrl 属性的使用。 var wpage = require('webpage').create(); wpage.open('http://localhost/tasks/content.html', function (status) { console.log(status); console.log(wpage.frameUrl); phantom.exit(); });JavaScriptCopy 上述程序生成以下输出。 success http://localhost/tasks/content.htmlJavaScriptCopy