... 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,
the_ property is "name" and the_ value
is
"thau". ... brainteaser—find all the Fs in
the text.
In the HTML, the block of text is
contained in a
div. Clicking on the link
makes the Fs bigge...
... 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
indexOf() and lastIndexOf() when the ... string.
The variable
two_slashes holds the value 5 because the two slashes start at
position 5. Line Y grabs everything two characters from the beginning of
the...
... 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) and goes down to the body of the
HTML. ... Chapter 15 s Italian Translator and Chapter 17’s To Do List
Application
The last appendix gives a couple of the book s longest code examples in
their entirety.
Com...
... element of an array and deletes that element from
the array
push()
FF, IE 5. 5 Appends a value to the end of an array
shift()
FF, IE 5. 5 Returns the first element of an array and shifts the other ... legal see the alerts in the
// if-then statement to see what the if-then statement is checking.
// If any of the conditions are violated, the script calls up an
/...
...
window.open("http://bookofjavascript.com", " ;book_ of_ javascript","width=6 05, height= 350 " );
Figure 5- 5 shows the result.
Figure 5- 5: The Book of JavaScript window opened with
a
height of ... 5
Manipulating the Appearance of New Windows
The three parameters of the window.open() command control the new
window’s characteristics....
... 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 ... 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
fo...
... 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...
... 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 ...
webserver. At the end of the URL we see a question mark, the key name
word,
an equal sign, and then the URL-legal value of the characters the user...
... "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...