Save 35% off the list price* of the related book or multi-format eBook (EPUB + MOBI + PDF) with discount code ARTICLE.
* See informit.com/terms
Learning Web Scripting Basics
You already know how to use two types of computer languages: HTML and CSS. You use HTML tags to describe how you want your document formatted. Then you use CSS to describe how you want the document displayed, and the browser shows the decorated content to the user. But because HTML and CSS are simple text-based languages, they can’t respond to the user, make decisions, or automate repetitive tasks. Interactive tasks such as these require a more sophisticated language: a programming language or a scripting language.
Scripts and Programs
Display messages to the user as part of a web page, in the browser’s status line, or in alert boxes
Validate the contents of a form and make calculations (for example, by having an order form automatically display a running total as you enter item quantities)
Animate images or create images that change when you move the mouse over them
Create ad banners that interact with the user rather than simply displaying a graphic
Detect what browser is in use or what features the browser has and perform advanced functions only on browsers that support them
Detect installed plug-ins and notify the user if a plug-in is required
Modify all or part of a web page without requiring the user to reload it
Display or interact with data retrieved from a remote server