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); } );
});}
转载于:https://www.cnblogs.com/c-x-a/p/7095455.html
相关资源:JAVA上百实例源码以及开源项目