What is JavaScript?
JavaScript is a scripting language that is widely used in the development of client Web pages (browsers), such as adding dynamic functions to HTML pages, such as responding to users ' various actions. JavaScript is a scripting language that is based on object and event-driven (event driven) and has a secure performance, most of which is performed by a Web browser.
JavaScript is the registered trademark of Sun Corporation, currently the latest version of JavaScript is 1.9, following the ECMA International (formerly the European Computer Manufacturers Association) of the ECMA-262 standard (that is, ECMAScript), the version is still evolving.
JavaScript Features
Scripting languages
JavaScript is a scripting language that uses small program segments to implement programming. Like other scripting languages, JavaScript is an interpretive language that is translated by line as the browser executes.
Object-based language
JavaScript is an object-based language and can also be viewed as object-oriented, meaning it can use objects that it has created. As a result, many features can be derived from the interaction of the methods and scripts of objects in the scripting environment.
of simplicity
To use scripting JavaScript is very simple, you do not need to install a specific development environment, only a simple Notepad to write JavaScript script. It has basic program syntax and language structure as well as weak data types, which are easy to learn and use.
Security
JavaScript is a security language, it does not allow access to the local hard disk, and can not save data to the server, do not allow the network documents to modify and delete, only through the browser to achieve information browsing or dynamic interaction, so as to effectively prevent the loss of data.
of dynamic
JavaScript is dynamic, and it can respond directly to user input without having to go through a WEB service program. It responds to the user's response in an event-driven manner. Event-driven refers to the actions that occur in a Web page to perform an action, called an event: such as pressing the mouse, moving the window, selecting a menu, and so on can be regarded as an event. When an event occurs, the corresponding JavaScript event response may be caused.
Cross-platform nature
JavaScript is performed by a Web browser, regardless of the operating system environment, as long as the browser's computer is running, and JavaScript-enabled browsers can perform correctly.
The difference between JavaScript and Java
JavaScript and Java are two languages that are completely different. Java, developed by Sun, is a more complex and powerful language and is used in a variety of contexts.