PhantomJS是以WebKit为核心并提供JavaScript编程接口(API)的无界面浏览器。 它提供对web标准的 快速 并且 原生 的支持: DOM操作、CSS选择符、JSON、Canvas和SVG。
1.下载解压PhantomJS http://phantomjs.org/
2.编写简单的测试代码, 保存为test.js, 解压后phantomjs\examples下有大量实例可供参考
console.log('Loading a web page'<span ); </span><span var</span> page = require('webpage'<span ).create(); </span><span var</span> url = 'http://www.phantomjs.org/'<span ; page.open(url, </span><span function</span><span (status) { </span><span //</span><span Page is loaded!</span> <span if</span> (status !== 'success'<span ) { console.log(</span>'Unable to post!'<span ); } </span><span else</span><span { console.log(page.content); } phantom.exit(); });</span>
3.因为我使用的是windows, 所以进入CMD命令行模式运行test.js, 并使用管道符将结果输出到test.txt. 如果不用管道的话,会直接输出结果。
.
4.因为PhantomJS支持命令行,所以在开发过程中我们可以使用PHP, Java, 或者Python直接获取结果就OK了

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Atom editor mac version download
The most popular open source editor

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Chinese version
Chinese version, very easy to use
