| |||||||||||||||||||||||||||||||||||||||||
|
JavaScript
Made Easy! Although JavaScript contains Java as part of its name, it has nothing to do with Java. Some people insist that you have to write scripts within the <HEAD> . . . </HEAD> block, but you can write them anywhere—except for few instances. I assume, your browser understands JavaScript because some older browsers cannot handle JavaScript. This is the main reason you have to write JavaScript as a series of comments so that it does not bother older browsers.
<SCRIPT language="JavaScript"> In reality, you doesn’t write this much of comment. You probably see the following code:
<SCRIPT language="JavaScript"> Let’s check your browser. Please click the button below.
If your browser don’t understand JavaScript, you won’t see the message box as shown below: Instead of writing the same code as shown above, I use the above button to check your browser. If I wrote the above code, each time you enter this page, the message box would pop up. Since this is a menu, visitors probably don’t like to see this message box each time they get back here. If I set up a button for the checking as shown above, you can simply skip this part when you come back later.
| ||||||||||||||||||||||||||||||||||||||||
|