JavaScript is designed to add interactive behavior to HTML pages.
JavaScript is a scripting language (script language is a lightweight programming language).
JavaScript consists of several lines of executable computer code.
JavaScript is usually embedded directly into HTML pages.
JavaScript is an interpretative language (that is, code execution is not precompiled).
JavaScript is available to all people without a license.
The client script
JavaScript "develops" browser behavior.
This is called a client script (or browser script).
Server-side scripting is the act of "making" the server (see the ASP/PHP tutorial on this site).
What can JavaScript do?
JavaScript provides HTML designers with a programming tool
HTML creators are often not programmers, but JavaScript is a scripting language with only extremely simple syntax!
Almost everyone has the ability to put short pieces of code into their HTML pages.
JavaScript puts dynamic text into HTML pages
A JavaScript declaration like this puts a variable piece of text into an HTML page: document.write (""""
JavaScript can respond to events
JavaScript can be set to be executed when an event occurs, such as when page load is complete or when a user clicks on an HTML element.
JavaScript can read and write HTML elements
JavaScript can read and change the content of HTML elements.
JavaScript can be used to validate data
JavaScript can be used to validate data before it is submitted to the server.
JavaScript can be used to detect visitors' browsers
JavaScript can be used to detect a visitor's browser and load the appropriate page for that browser based on the detected browser.
JavaScript can be used to create cookies
JavaScript can be used to store and recover information that is located on the visitor's computer.
What is HTML DOM?
HTML DOM defines the standard way to access and manipulate HTML documents.
The DOM expresses HTML documents as tree structures.