What Is JavaScript? Is It the Same As Java?

JavaScript is NOT Java! JavaScript is a basic scripting language that allows web authors to create dynamic pages that interact with users.

JavaScript commands are contained within the HTML code of the Web page and are interpreted by the browser as it is read, in contrast to Java programs that are downloaded separately from the HTML page. JavaScript is a "safe" programming language, one that cannot access any system controls, files or hardware on a user's computer.

JavaScript provides greater flexibility to the web designer through such luxuries as being able to create windows, display moving text, sound or other multimedia elements with relative ease. JavaScript often is used in place of common CGI operations, like verifying form input. It can also be used to control Java applets or plugins, or even open up new browser windows to aid in site navigation.

JavaScript code can be inserted in <script> tags within a page's HTML code, or embedded into a page to react to HTML "event handlers," such as a page loading, a button being clicked, or a window opening.

JavaScript was first introduced in Netscape Navigator 2.0 and is supported in all subsequent versions of Netscape. Microsoft's JScript, their own version of JavaScript, inconsistently supports JavaScript (while causing errors the rest of the time) in Internet Explorer 3.0 and above. All modern browsers can interpret JavaScript (with a few irritating side-effects for older browsers).

Overall, JavaScript is a fairly universal extension to HTML that can enhance the user experience through event handling and client-side execution, while extending a web developer's control over the client's browser.

Sample JavaScript date function to spruce up your web page!
        <font face='Arial, Univers, Helvetica'>" +
            Date() + ".</font>")