NUTSHELL

Course- Javascript >

A program written in JavaScript can access the elements of a web page, and the browser window in which it is running, and perform actions on those elements, as well as create new page elements. A few examples of JavaScript’s capabilities include


  • Opening new windows with a specified size, position, and style (for example, whether the window has borders, menus, toolbars, and so on)
  • Providing user-friendly navigation aids such as drop-down menus
  • Validation of data entered into a web form to make sure that it is of an acceptable format before the form is submitted to the web server
  • Changing how page elements look and behave when particular events occur, such as the mouse cursor moving over them
  • Detecting and exploiting advanced features supported by the particular browser being used, such as third-party plug-ins, or native support for new technologies

Because JavaScript code runs locally inside the user’s browser, the page tends to respond quickly to JavaScript instructions, enhancing the user’s experience and making the application seem more like one of the computer’s native applications rather than simply a web page. Also, JavaScript can detect and utilize certain user actions that HTML can’t, such as individual mouse clicks and keyboard actions.

Virtually every web browser in common use has support for JavaScript.