|
JavaScript is a scripting language that will allow you to add real
programming to your webpages.
Since javascript isn't HTML, you will need to let the browser know in
advance when you enter javascript to an HTML page. This is done using
the to
tell where javascript starts and ends.
Consider this example:
|
<html>
<head>
<title>My Javascript Page</title>
</head>
<body>
<script
type="text/javascript">
alert("Welcome to my world!!!");
</script>
</body>
</html>
|
|
The word alert is a standard javascript command that will cause an
alert box to pop up on the screen. The visitor will need to click the
"OK" button in the alert box to proceed.
By entering the alert command between the
tags, the browser will
recognize it as a javascript command.
If we had not entered the
sections of the document. In general however, it is advisable to keep as much as possible in the section. Knowing that javascript needs to be entered between |