THE BOOK OF JAVASCRIPT, 2ND EDITION phần 3 doc
... shows you what each of these elements looks like, and Figure 7-7 shows you the HTML used to draw Figure 7-6. 136 Chapter 8 How the Book of JavaScript Tip Box Works The Book of JavaScript website ... most of the part identifying the form, window.document .the_ form, with the word this, which refers to the thing that contains it. For example, in X of Figure 7-25,...
Ngày tải lên: 06/08/2014, 16:23
... it. The function multiplyTheFields() does all the work. The code in X of Figure 7-16 looks up the value of the text field field_one (]) inside the form my_form, located in the document of the ... 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...
Ngày tải lên: 06/08/2014, 09:20
... browsers X var the_ timeout; Y function upDate() { Z var the_ number = window.document .the_ form .the_ text.value; [ the_ number = parseInt (the_ number) + 1; \ window.document .the_ form .the_ text.value = the_ number; ] ... 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...
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 ind...
Ngày tải lên: 06/08/2014, 09:20
THE BOOK OF JAVASCRIPT, 2ND EDITION phần 6 doc
... webserver: either the web page named in the href attribute of the link, or the results of a program or script named in the action attribute of the <form> tag. Once the request is sent, the browser ... when the user presses ENTER while the cursor is in the text box (thereby submitting the form). In either case, the function getTranslations() is called...
Ngày tải lên: 06/08/2014, 16:23
THE BOOK OF JAVASCRIPT, 2ND EDITION phần 8 doc
... elements of the XML document. It then loops through the array and uses getFirstValue() to determine the value of the name child of each user element. If the name child is the same as the name ... Code? Most of the code in this application was written in JavaScript and therefore appeared on the client side. I designed the application this way because this is Th...
Ngày tải lên: 06/08/2014, 16:23
the book of javascript 2nd edition phần 1 pptx
... HTML 233 Real-World Examples of DHTML 234 CSS Basics 234 The <div> Tag 235 Positioning a div with CSS 235 Hiding a div 237 Layering divs 237 JavaScript and DHTML 238 Making divs Move 239 Using ... 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.book...
Ngày tải lên: 06/08/2014, 09:20
the book of javascript 2nd edition phần 2 pot
... file (src) of the image named my_image within the document object in the current window. The current window is the one in which the JavaScript is located. The document Object The document object ... Rollovers 53 change to show the back of the book (see Figures 4 -3 and 4-4). Mouse off the Turn it over! image again and the book image switches back to the f...
Ngày tải lên: 06/08/2014, 09:20
the book of javascript 2nd edition phần 6 pot
... 13- 20: 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 ... 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