Skip links

Javascript

JavaScript (JS) is an open source client-side scripting language commonly implemented as part of a web browser in order to create enhanced user interfaces and dynamic websites.

The most common use of JavaScript is to write functions that are embedded in or included from HTML pages and that interact with the Document Object Model (DOM) of the page. Some simple examples of this usage are:

  • Loading new page content or submitting data to the server via AJAX without reloading the pageĀ 
  • Animation of page elements, fading them in and out, resizing them, moving them, etc.
  • Interactive content, for example games, and playing audio and video
  • Validating input values of a web form to make sure that they are acceptable before being submitted to the server.
  • Transmitting information about the user’s reading habits and browsing activities to various websites. Web pages frequently do this for web analytics, ad tracking, personalization or other purposes.