Science  People  Locations  Timeline
Index: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Home > JavaScript


 

JavaScript is an object-oriented scripting language commonly used in websites. It was originally developed by Brendan Eich of Netscape Communications under the name Mocha and then LiveScript but then renamed to "JavaScript" and given a syntax closer to that of Sun MicrosystemsJava language. JavaScript was first standardized in 1997–1999 by ECMA under the name ECMAScript. The standard ( as of December 1999) is ECMA-262 Edition 3, and corresponds to JavaScript 1.5. This is also now an ISO standard.

1 Java, JavaScript, and JScript

The change of name from LiveScript to JavaScript happened at roughly the time that Netscape was including support for Java technology in its Netscape Navigator browser. The choice of name proved to be a source of much confusion. There is no real relation between Java and JavaScript; their similarities are mostly in syntax (both derived from C); their semantics are quite different, notably their object models are unrelated and largely incompatible.

Due to the de facto success of JavaScript as a web page enhancement language, Microsoft had little choice but to develop a compatible language; this is known as JScriptJScript is Microsoft's implementation of ECMAScript. It is available through both Internet Explorer and the Windows Scripting Host. The most recent version is JScript. NET, which is based on the yet-unfinished version 4 of the ECMAScript standard, and can. The need for common specifications for that language was the basis of the ECMA 262 standard for ECMAScript (see external linksJavaScript is an object-oriented scripting language commonly used in websites. It was originally developed by Brendan Eich of Netscape Communications under the name Mocha and then LiveScript but then renamed to "JavaScript" and given a syntax closer to th below), three editions of which have been published since the work started in November 19961996 was a leap year starting on Monday (see link for calendar), and was designated the International Year for the Eradication of Poverty''. Events January January 5 Hamas operative Yahya Ayyash is killed by an Israeli-planted booby-trapped cell phone Jan (and which in turn set the stage for the standardization of C#C (pronounced see-sharp is an object-oriented programming language developed by Microsoft as part of their. NET initiative. Microsoft based C# on C++ and the Java programming language. C# was designed to balance power (the C++ influence) with rapid develo a few years later).

2 Usage

JavaScript is an object-based scripting language with a syntax loosely based on C. Like C, it has the concept of reserved keywords, which (being executed from source) means it is almost impossible to extend the language without breakage.

Also like C, the language has no input or output constructs of its own; where C relies on standard I/O libraries, a JavaScript interpreter relies on a host program into which it is trivially (or more complexly) embedded. There are many such host programs, of which Web technologies are the most well known examples. These are examined first.

JavaScript embedded in a Web browser connects through interfaces called Document Object ModelDocument Object Model (DOM is a form of representation of structured documents as an object-oriented model. DOM is the official World Wide Web Consortium (W3C) standard for representing structured documents in a platform- and language-neutral manner.s (DOMs) to applications, especially to the server side ( web serverThe term web server can mean one of two things: # a computer responsible for serving web pages, mostly HTML documents, via the HTTP protocol to clients, mostly web browsers; # a software program that is working as a daemon serving web documents. Every webs) and the client side web browserA web browser is a software package that enables a user to display and interact with documents hosted by web servers. Popular browsers include Microsoft Internet Explorer and Mozilla Firefox. A browser is the most commonly used kind of user agent. The lar of internetThis article is about the Internet the extensive, worldwide computer network available to the public. An internet is a more general term for a set of interconnected computer networks that are connected by internetworking''. WWW information network structu applications. Many web sites use client-side JavaScript technology to create powerful dynamic web applications. It may use Unicode and can evaluate regular expressions (introduced in version 1.2 in Netscape Navigator 4 and Internet Explorer 4). JavaScript expressions contained in a string can be evaluated using the eval function.

One major use of Web-based JavaScript is to write little functions that are embedded in HTML pages and interact with the DOM of the browser to perform certain tasks not possible in static HTML alone, such as opening a new window, checking input values, changing images as the mouse cursor moves over, etc. Unfortunately, the DOMs of browsers are not standardized, different browsers expose different objects or methods to the script, and it is therefore often necessary to write different variants of a JavaScript function for the various browsers.

Outside of the Web, JavaScript interpreters are embedded in a number of tools. Adobe Acrobat and Adobe Reader support JavaScript in PDF files. The Mozilla platform, which underlies several common Web browsers, uses JavaScript to implement the user interface and transaction logic of its various products. JavaScript interpreters are also embedded in proprietary applications that lack scriptable interfaces. Finally, Microsoft's WSH technology supports JavaScript (via JScript) as an operating system scripting language.

Each of these applications provides its own object model which provides access to the host environment, with the core JavaScript language remaining mostly the same in each application.

There are a number of different implementations of the core JavaScript language, including:



Read more »

Non User