THE BOOK OF JAVASCRIPT, 2ND EDITION phần 10 potx
... of the top border of the browser window’s content area relative to the upper left corner of the screen. The content area is where the web page resides. screenX FF Horizontal coordinate of the ... left side of the window screenY FF Vertical coordinate of the top of the window scrollX FF Read-only: Horizontal scrolling of the browser window scrollY FF Read...
Ngày tải lên: 06/08/2014, 16:23
... to the upper left corner of the screen. The content area is where the web page resides. screenX FF Horizontal coordinate of the left side of the window screenY FF Vertical coordinate of the ... it. Takes three param- eters: the URL of the window to open, the target name of the window, and a comma-delimited list of features the window should have. Some o...
Ngày tải lên: 06/08/2014, 09:20
... Application The last appendix gives a couple of the book s longest code examples in their entirety. Companion Website The Book of JavaScript website (http://www.bookofjavascript.com) contains the code ... represent the other major arithmetic functions. When the browser finishes its calculations in our example, it reaches the end of the JavaScript in the head (Z)...
Ngày tải lên: 06/08/2014, 09:20
the book of javascript 2nd edition phần 2 pot
... 5 Manipulating the Appearance of New Windows The three parameters of the window.open() command control the new window’s characteristics. The URL Parameter The first parameter is the URL of the page ... click the link, an alert box should come up and say Off to the Book of JavaScript! (Figure 4-6). When you click OK in the box, the page should load the Bo...
Ngày tải lên: 06/08/2014, 09:20
the book of javascript 2nd edition phần 3 pot
... sets the left border of the window you’re moving. If you move the left border of the window into the center of the screen, the window will be too far to the right. To get the window to the center ... into the function. Now the_ date gets changed to 2 010. The value of the_ date is returned to the awaiting variable. The awaiting variable is the_ fixed_...
Ngày tải lên: 06/08/2014, 09:20
the book of javascript 2nd edition phần 4 doc
... X. The first line in the body of the func- tion then swaps the image stored in position 0 of the_ images with the image on the page. If rotateImage(1) was called instead of rotateImage(0), the ... and then test again. In [ of Figure 8 -10, the test is index < 10 (the same as Y in the while loop). The final piece is the incrementer, a statement that cha...
Ngày tải lên: 06/08/2014, 09:20
the book of javascript 2nd edition phần 5 docx
... of the upper-left corner and the x and y coordinates of the lower-right corner, in pixels. So the first area in Figure 10- 19 goes from the (9, 23) point of the image to the (41, 42) point of ... indexOf(), the lastIndexOf() method gives you the position of the last occurrence of a character or substring. Table 11-1 shows the value of various calls to i...
Ngày tải lên: 06/08/2014, 09:20
the book of javascript 2nd edition phần 6 pot
... Detecting the position of the mouse 246 Chapter 13 node to the end of the list of the parent’s children. If our parent is the body of the document, that puts the div at the end of the document. ... along the colon. It then loads the first part of the element into the_ property and the second part into the_ value. The first time through the loop...
Ngày tải lên: 06/08/2014, 09:20
the book of javascript 2nd edition phần 7 ppsx
... into which the results of the script will be placed. The ems you see in the style of the div set the width of the div equal to some multiple of the width of the letter m (em) in the font being ... as the second parameter, the old contents of the file are deleted. Therefore, if you want to edit the contents of a file, you should first read the c...
Ngày tải lên: 06/08/2014, 09:20
the book of javascript 2nd edition phần 8 ppsx
... "HEAD", then all the PHP script should do is send the header information in X. If it is not a HEAD request, then the body of the if-then clause reads the contents of the file into the $contents ... false;">odysseus</a> The body of the link is the name of the available list (shown here as odysseus). An onClick inside the link calls rea...
Ngày tải lên: 06/08/2014, 09:20