基于webkit的javaScript API。提供了css选择器,提供了处理文件的I/O操作,支持Web标准、DOM操作、JSON、HTML5、Canvas、SVG。
mac安装配置:
1. http://phantomjs.org/download.html下载phantomjs-2.1.1-macosx;
2. 命令行输入:cd /usr/bin/;
3. 再执行:open ~/.bash_profile;
4. 在.bash_profile中添加(路径为你安装的phantomjs的路径):export PATH="$PATH:/Users/xxx/phantomjs-2.1.1-macosx/bin";
5. 在终端输入:echo $PATH,路径清单将显示如下内容:
sbin:/Users/xxx/phantomjs-2.1.1-macosx/bin;
6. 完成!