Java Script is a scripting language that is widely used as
programming tools in the webpages.
With Java Script we can add simple and usual applications, like
games, solving linear equatuoins, to our webpages. Other applications
are specific to internet technology. Such applications include detection
of browsers, popupmenus and other OnMouseOver and OnMouseOut capabilities.
The Beginning
Note that Javascript is not HTML, although it is used within HTML-files.
The Javascript codes are written between the
The
Javascript Commands and Examples
Following is a list of javascript commands followed by examples and links
to explain their usage.
-
document.write
-
The Simple Use of "document.write"
-
Use of bottons
-
Use of buttons .
-
alert
-
The command "alert" is a vary commonly used javascript
command. The box that poped up in beginning was created using this
command. Let us look at some Simple Examples.
-
Use of alert-command.
-
confirm
-
The command "confirm" is also a very commonly used javascript
command and very similar to alert-command - both in usages and effect.
Let us look at some Simple Examples.
-
Use of confirm-command.
-
prompt
-
The command "prompt" is also a very commonly used javascript
command and very similar to the alert and confirm command.
Let us look at some Simple Examples.
-
Use of prompt-comma
nd.
-
if ... else
-
The use of if ... else is similar to any other
programing language.
Because of the following javascript script codes, the button and
the corresponding effect appeared.
-
Another site on use of if ...
else
-
Another site on use of if ... else
-
input
An "INPUT" command has a type. Among the types I have seen are
type="button", type="submit" type="hidden", type="text", type="radio".
-
We have seen the use of "INPUT"-command with the bottons that was of
the type="button". This type goes with
alert command,
confirm command,
prompt command.
The general syntax is:
-
With type="text" we get the following.
-
With type="submit" we get the following.
-
With type="hidden" we get the following.
-
With type="radio" (twice) we get the following.
-
In the following page we show how to play with "password"-type>
-
-
onClick
This "onClick"-command goes with the bottons and alert-, confirm-, prompt-boxes,
that we have seen.
-
onMouseOver and onMouseOut actions:
These two commands or actions onMouseOver and OnMouseOut are very familiar
to most users. I have two comments to make to begin with.
First, These
commands/actions always used with a link (.) Sometimes, it is used with the empty link
Second, this two are also used together. Usually, onMouseOver to do something
and onMouseOut to undo. Now we have the following links for simple
examples and oterwise.
-
Some Simple Use of onMouseOver ans onMouseOut
commands.
-
Some Simple Use POP-UP-GIF on onMouseOver and
onMouseOut commands. This one was done without
use of functions.
-
Some Simple Use POP-UP-GIF on onMouseOver and
onMouseOut commands. This one was done with use
of functions.
-
Some Simple Use POP-UP-GIF on onMouseOver and
onMouseOut commands. This one showing use of MULTIPLE GIFS.
-
Some Trial Only .
-
A site on Use of onMouseOver ans onMouseOut commands.
-
A site on Use of onMou
seOver ans onMouseOut commands.
-
onFocus
-
onBlur
-
onChange
-
onSelect
-
onLoad
The onLoad command asks the browser to do something when the user enters
the page.
-
We used onLoad command in our
POP-UP-GIFS pages in the OnMouseOver and -Out section.
We insert it on the body section as follows:
It asks the browser to call the function init() when loading is over.
So that browser would know the value of the array menber menus[0].
-
Here is another
simple use of onLoad command.
-
Here is YET another
simple use of onLoad command.
-
onUnload
-
onSubmit
-
A simple use of onSubmit Command
- Loops
-
for
-
while
-
break
-
continue
The use of these 4 loop-commands in Java Script are similar other
languages. Reader can look at the following links:
-
A link for use of LOOPs
in Java Script.
-
USEFUL LINKS
-
First Disable, Reset