Introduction to Javascript
JavaScript is a client-side scripting language that many webmasters find quite useful. Essentially, JavaScript performs simple actions within the viewer's web browser. This is advantageous because it means that the viewer doesn't need to wait for the website to communicate with the server again.
JavaScript was designed to be similar to many other programming languages (for example, its syntax is quite like the C programming language). It is streamlined, with simple naming conventions, and is designed to be easy to learn. Many web designers learn JavaScript not long after becoming familiar with the basics of static web content such as HTML and CSS. (Andreessen)
Conceptually, JavaScript is similar to AJAX in that in runs within the web browser to perform simple tasks. There are numerous uses for this sort of technology; even though it won't provide the fully dynamic feel that a data-driven website will--JavaScript doesn't interact with much data on the server. Effective use of JavaScript can make your website more intuitive, and can provide your users with a more productive experience. (Web Programming)
Examples: JavaScript, in some form, is used in many websites today. Common examples include user data validation, pop-up windows, and increased responsiveness to user actions. The first is common when the user is expected to enter data; for example, if a website asks for a telephone number and an email address, but the user enters data that does not meet the specific format of telephone numbers (xxx-xxx-xxxx) or email addresses (x@y.z), JavaScript can be used to stop the submission of that data and prompt the user to correct their error. Since many forms of interactivity rely on users submitting data or comments, this form of verification is useful. So, too, is JavaScript used to create pop-up windows and boxes that ask the users to confirm their actions--this can prevent users from taking significant actions, like ordering a product online, inadvertently. As a final example, JavaScript is also used to highlight things for the user; some sites will change the background of a textbox in which the user is currently typing or the link over which the user is currently hovering his or her mouse cursor to highlight such facts to the user. Such highlighting can make submitting data and navigating a website easier.