Java has no independent functions, only methods


Java has no independent functions, only methods. These differences arise from the fact that Java is both explicitly typed and strongly typed. In Java every piece of data must have a type. Every structured data type, such as String, is a class, while the data itself is an instance of that class.
This concept of strong typing pervades all of Java, and is even reflected in the differences in terminology with JavaScript.

JavaScript can be used to create several useful visual effects


JavaScript can be used to create several useful visual effects, including alternating color schemes, fades, scrolling marquees, and dynamic graphics.
Unlike effects created using other tools, JavaScript effects load quickly as part of your document, and can start even before a page is completely loaded.

You’ve often seen http: or ftp: at the beginning of a URL


You’ve often seen http: or ftp: at the beginning of a URL. This is the protocol: it tells the browser which protocol handler to use to retrieve the object referred to after the colon. The javascript: protocol is really no different; it simply instructs the browser to let JavaScript retrieve the object.
But rather than initiate communication with another server, the JavaScript handler returns the value of the variable or function cited after the colon. The value returned should be HTML or some other MIME type the browser knows how to display.

Sometimes it’s desirable to initially leave a frame blank


Sometimes it’s desirable to initially leave a frame blank and load the contents later. For instance, the value of the frame may depend on user input or the result of a lengthy calculation or process.
You could load an empty document from the server, but that wastes a server access. It’s faster and easier to use the javascript: protocol to load the empty document internally.

The Fader object itself is similar in construction to the Alternator object


The Fader object itself is similar in construction to the Alternator object. The Fader() constructor takes a beginning BodyColor object (bodyA), an ending BodyColor object (bodyB), and a text string containing the HTML and text to be displayed.
In addition, the Fader() constructor takes the number of steps to be used in the transition from the beginning colors to the ending colors.

ToString() method, FaderString() is a bit more complex than its Alternator


The toString() method, FaderString(), is a bit more complex than its Alternator counterpart. It creates a temporary BodyColor object, and populates it with IntColor objects for each color attribute that is present in both the beginning and ending BodyColor objects. It then increments the current step.
When all steps have been completed, it resets the current step to zero, so the object can be reused. It returns the specified text, along with an embedded BODY tag generated from the temporary BodyColor object.

Like the Alternator effect, the Fader effect involves the transition


Like the Alternator effect, the Fader effect involves the transition from one color scheme to another. But instead of jumping abruptly between colors, the Fader displays a series of intermediate shades, creating the illusion of a smooth transition.
Although the Alternator effect is noisy and jarring, the Fader effect is calm, serene, even solemn. In particular, a slow fade up from black can lend a somber, serious tone to the message being conveyed. Or the Fader can be used to create wild, psychedelic effects-whichever best suits your purpose.

JavaScript offers tremendous flexibility in interacting with the user


JavaScript offers tremendous flexibility in interacting with the user. You can create entire documents on-the-fly. You can dynamically customize both the content of a document and its appearance according to user criteria and other factors.
User input also benefits from this flexibility: prompts can be dynamically generated, and even free-form input can be processed.

You can specify either a variable or a function name on the right side


You can specify either a variable or a function name on the right side of the colon in a javascript: URL. Normally, you use a variable to return an unchanging value, whereas you use a function to return dynamic content.
If a variable name refers to an object, however, and that object has a toString() method defined, the function associated with the toString() method is called when the object is referenced in a javascript: URL, in which case dynamic content may be returned.

For many applications in which a degree of apparent randomness is desirable


For many applications in which a degree of apparent randomness is desirable, using the Date object alone yields acceptable results. When you need a series of “random” numbers one after another,however, the Date object isn’t of much help.
Chances are, whatever calculations you’re performing or effects you’re creating will be finished before the Date object advances to a new value.