我設置一個全局變量 var URL = [];
和獲取數據: casper.then(function() {
// I get 19 links from this code
URL = this.evaluate(getURL);
// I can see i get the first link
console.log(URL[0] + '****
我使用CasperJS從網站http://www.u-movie.com.tw/page.php?page_type=now&portal=cinema&ver=tw獲取數據。 我想刪除沒有ID的<p>。 所以我儘量選擇根和刪除它,但它會顯示null is not an object 如果我僅僅只有JavaScript如何解決它不使用jQuery? 任何幫助,將不勝感激。 這裏是我的文檔的一部分: