官术网_书友最值得收藏!

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. The following are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "The onLoadStarted event will be triggered when PhantomJS starts loading the page based on the resources received."

A block of code is set as follows:

var system = require('system');
var url = system.args[1];

var page = require('webpage').create();
page.onLoadStarted = function () {
  console.log('Page Loading Started');
};

page.onLoadFinished = function () {
  console.log('Page Loaded');
  phantom.exit(0);
};

page.open(url);

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

[default]
exten => s,1,Dial(Zap/1|30)
exten => s,2,Voicemail(u100)
exten => s,102,Voicemail(b100)
exten => i,1,Voicemail(s0)

Any command-line input or output is written as follows:

$ ./phantomjs pageload3.js http://www.google.com
Loading takes 6.751 seconds.
0.255 seconds : http://www.google.com/
0.379 seconds : http://www.google.com.ph/
0.213 seconds : http://ssl.gstatic.com/gb/images/b_8d5afc09.png
0.676 seconds : http://www.google.com.ph/images/srpr/logo1w.png
0.561 seconds : http://www.google.com.ph/images/srpr/nav_logo80.png
6.135 seconds : http://www.google.com.ph/xjs/_/js/hp/sb_he,pcc/rt=j/ver=_aDh7zAWqI8.en_US./d=1/sv=1/rs=AItRSTOgg467Qcx4GftzMMz3ZDPd84lcog

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes, for example, appear in the text like this: "Using a simple page open, handling these two events will give us two console prints: Page Loading Started which is displayed first, followed by Page Loaded."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

主站蜘蛛池模板: 正镶白旗| 嘉义县| 夏河县| 山丹县| 义乌市| 凌云县| 临沧市| 阳春市| 克山县| 固阳县| 滁州市| 观塘区| 平乡县| 南宫市| 基隆市| 高陵县| 新野县| 连州市| 河南省| 永川市| 汕尾市| 射阳县| 台北县| 衡阳县| 仪陇县| 罗田县| 进贤县| 岳普湖县| 买车| 化州市| 乐陵市| 苗栗县| 万安县| 平阳县| 红安县| 中山市| 玛多县| 延寿县| 荣昌县| 卓尼县| 沧州市|