phantomhs获取网页的高度
function heheda()
{
window.setTimeout(function () {
console.log("---------------------Capture Original Begin------------------------------");
var scrollheight=page.evaluate(function () {
return document.body.scrollHeight;
});
page.viewportSize = {width:414,height:scrollheight};
page.render(outOriginalimg);
console.log("---------------------Capture Begin------------------------------");
markCapture();
console.log("scrollheight:"+scrollheight);
window.setTimeout(function () {
page.render(output);
page.close();
console.log('render ok');
phantom.exit();
}, 10000);
}, 25000);
}
);
});
}