JavaScript Tutorials

A collection of JavaScript tutorials to help you learn or sharpen your JavaScript skills.

1426 views

Edited: 2021-01-23 17:32

Learn JavaScript & jQuery

JavaScript is a client-sided scripting language that makes it possible to manipulate the layout and content of HTML pages; but, it can also be used fore more complex things — including the creation of images!

The tutorial collection on this page can be used as a reference when learning JavaScript. Each article generally includes live examples of the code so that you can preview the results directly from your browser.

Generally tutorials should also include library example code. jQuery is a JavaScript library that should make it easier to work with DOM (Document Object Model) manipulation.

  1. getElementById should be used to select unique elements in a HTML document. Selected elements can be manipulated with JavaScript.
  2. Should you use querySelector or getElementById?; querySelector is more flexible, and able to perform more complex selections.
  3. the keydown event is not an ideal way to detect text-input by the user; instead you should consider using the input event.
  4. Easily check if an element is either hovered or in focus using plain JavaScript.
  5. The Width and Height of the browser Window can be obtained through the innerWidth and innerHeight properties; these can be checked by an event handler to detect resize events.

More in: JavaScript Tutorials