What is JavaScript?
- JavaScript is a scripting language to add interactivity to HTML pages
- A scripting language is a lightweight programming language
- A JavaScript consists of lines of executable computer code
- A JavaScript is usually embedded directly into HTML pages
- JavaScript is an interpreted language (means that scripts execute without preliminary compilation)
- Everyone can use JavaScript without purchasing a license
What can a JavaScript Do?
- JavaScript gives HTML designers a programming tool - HTML authors are normally not programmers, but JavaScript is a scripting language with a very simple syntax! Almost anyone can put small "snippets" of code into their HTML pages
- JavaScript can put dynamic text into an HTML page - A JavaScript statement like this: document.write("<h1>" + name + "</h1>") can write a variable text into an HTML page
- JavaScript react to events - A JavaScript can be set to execute when something happens, like when a page has finished loading or when a user clicks on an HTML element
- JavaScript can read and write HTML elements - Read and change the content of an HTML element
- JavaScript can be used to validate data - Validate form data before it is submitted to a server to save server from extra processing
- JavaScript can be used to detect the visitor's browser - to load page appropriate for that browser
- JavaScript can be used to create cookies -Store and retrieve information on the visitor's computer
The Real Name is ECMAScript
- JavaScript's official name is "ECMAScript".
- ECMA-262 is the official JavaScript standard based on JavaScript (Netscape) and JScript (Microsoft).
- The language was invented by Brendan Eich at Netscape (with Navigator 2.0), and has appeared in all Netscape and Microsoft browsers since 1996.
- Development of ECMA-262 started in 1996, and the first edition of was adopted by the ECMA General Assembly in June 1997.
- The standard was approved as an international ISO (ISO/IEC 16262) standard in 1998.
- The development of the standard is still in progress.
|