我设置一个全局变量 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? 任何帮助,将不胜感激。 这里是我的文档的一部分: