JavaScript programs are used to detect and react to user-initiated events, such as a mouse going over a link or graphic. They can improve a Web site with navigational aids, scrolling messages and rollovers, dialog boxes, dynamic images, shopping carts, and so forth. JavaScript lets you control the appearance of the page as the document is being parsed. Without any network transmission, it lets you validate what the user has entered into a form before submitting the form to the server. It can test to see if the user has plug-ins and send them to another site to get the plug-ins if needed. It has string functions and supports regular expressions to check for valid e-mail addresses, social security numbers , credit card data, and the like. JavaScript serves as a programming language. Its core language describes such basic constructs as variables and data types, control loops , if/else statements, switch statements, functions, and objects. [3] It is used for arithmetic calculations, manipulates the date and time, and works with arrays, strings, and objects. JavaScript also reads and writes cookie values, and dynamically creates HTML based on the cookie value.
|