0
我想創建示例腳本以登錄我的網站。
我喜歡這個劇本:PhantomJS page.includeJs不工作
var page = require("webpage").create();
var system = require("system");
var data = {
"username": system.args[1],
"password": system.args[2]
}
function login(data){
page.open("http://localhost/mywebsite/login.php", function(){
page.includeJs("https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js", function(){
console.log("Come in here.");
phantom.exit();
)}
)}
}
login(data);
當我運行在終端phantomjs,例如:phantomjs myscript.js admin管理員
我沒有得到我的任何終端。
我的代碼有什麼問題?
你的代碼謝謝你,夥計! –