interact with the web page. The example below adds a button that
turns our phone on and off. It is also useful to the developer,
who can use it to check if certain events have happened, and
create a script that reacts. The second version of our phone sends a ring alert
once the page is loaded.
It is customary to have the actual script in the head section, although an
onload script might also find itself in the body of the code. Scripts are
functions, in the tradition of C languages. The function name is followed
by brackets with the input conditions (or none), and the action to be performed
is within curly braces.
source:Phone and Cat are from Google images.
* * *
source: Wikipedia
* * *
http://eloquentjavascript.net/
No comments:
Post a Comment