Phantomjs-frameurl-property

提供:Dev Guides
2020年6月23日 (火) 08:10時点におけるMaintenance script (トーク | 投稿記録)による版 (Imported from text file)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

PhantomJS-frameUrlプロパティ

このプロパティは、現在フォーカスされているフレームのURLを返します。

構文

その構文は次のとおりです-

var wpage = require('webpage').create();
wpage.frameUrl;

*frameUrl* プロパティの使用を理解するために例を見てみましょう。
var wpage = require('webpage').create();
wpage.open('http://localhost/tasks/contentl', function (status) {
   console.log(status);
   console.log(wpage.frameUrl);
   phantom.exit();
});

上記のプログラムは、次の出力を生成します。

success
http://localhost/tasks/contentl