如何让Phantomjs在Windows上执行js文件 [英] How to have Phantomjs execute a js file on Windows

查看:508
本文介绍了如何让Phantomjs在Windows上执行js文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚执行了phantomjs.exe和一个命令行窗口弹出窗口. 如何执行./examples/下的.js文件?如果仅输入文件名"version.js",则会收到错误消息-找不到变量:版本".

I just executed phantomjs.exe and a command line window popup. How could I execute the .js files under ./examples/? If just enter the file name "version.js", I got the error message - "cannot find the variable: version".

谢谢!

推荐答案

打开命令窗口-可以通过按住SHIFT +右键单击来完成,这里可以选择打开命令窗口" ...

Open the command window - this can be done by holding SHIFT + Right mouse click and there is a choice of Open command window here...

然后从命令行中可以调用phantomjs.exe

From the command line you can then invoke the phantomjs.exe

  $ path/to/phantomjs.exe path/to/version.js

这篇关于如何让Phantomjs在Windows上执行js文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆