10.02.2018 Views

js_tutorial

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

16. Page Redirect .......................................................................................................................................... 89<br />

What is Page Redirection? ............................................................................................................................. 89<br />

JavaScript Page Refresh ................................................................................................................................. 89<br />

Auto Refresh .................................................................................................................................................. 89<br />

How Page Re-direction Works? ..................................................................................................................... 90<br />

17. Dialog Box ............................................................................................................................................... 94<br />

Alert Dialog Box ............................................................................................................................................. 94<br />

Confirmation Dialog Box ................................................................................................................................ 95<br />

Prompt Dialog Box ......................................................................................................................................... 96<br />

18. Void Keyword ......................................................................................................................................... 98<br />

19. Page Printing ......................................................................................................................................... 101<br />

How to Print a Page? ................................................................................................................................... 102<br />

PART 2: JAVASCRIPT OBJECTS ................................................................................................. 103<br />

20. Objects .................................................................................................................................................. 105<br />

Object Properties......................................................................................................................................... 105<br />

Object Methods ........................................................................................................................................... 105<br />

User-Defined Objects .................................................................................................................................. 106<br />

Defining Methods for an Object .................................................................................................................. 108<br />

The ‘with’ Keyword ...................................................................................................................................... 109<br />

21. Number................................................................................................................................................. 111<br />

Number Properties ...................................................................................................................................... 111<br />

MAX_VALUE ................................................................................................................................................ 112<br />

MIN_VALUE ................................................................................................................................................. 113<br />

NaN .............................................................................................................................................................. 114<br />

NEGATIVE_INFINITY ..................................................................................................................................... 116<br />

POSITIVE_INFINITY ...................................................................................................................................... 117<br />

Prototype ..................................................................................................................................................... 118<br />

constructor .................................................................................................................................................. 120<br />

Number Methods ........................................................................................................................................ 120<br />

toExponential () ........................................................................................................................................... 121<br />

toFixed () ...................................................................................................................................................... 123<br />

toLocaleString () .......................................................................................................................................... 124<br />

toPrecision () ............................................................................................................................................... 125<br />

toString () ..................................................................................................................................................... 126<br />

valueOf () ..................................................................................................................................................... 127<br />

22. Boolean ................................................................................................................................................ 129<br />

Boolean Properties ...................................................................................................................................... 129<br />

constructor () ............................................................................................................................................... 129<br />

Prototype ..................................................................................................................................................... 130<br />

Boolean Methods ........................................................................................................................................ 131<br />

toSource () ................................................................................................................................................... 132<br />

toString () ..................................................................................................................................................... 133<br />

valueOf () ..................................................................................................................................................... 134<br />

iv

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!