JavaScript Tutorials

Tutorials focused on JavaScript scripting language, and creating dynamic HTML pages.

  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.
  6. Cool tutorial on how to change the iframe src attribute value using JavaScript.
  7. Learn how to use if statements in JavaScript to perform conditional execution of code.
  8. You can either use a pure JavaScript solution, or you can choose to go with a library such as JQuery. Either way, this short tutorial show how it is done. Enjoy!
  9. We can not handle HTTP POST data from JavaScript, but we can still access the data while it is in the HTML form.
  10. How to solve forEach is not a function in JavaScript, and information about why it happens.

About JavaScript

JavaScript is a scripting language primarily used to create dynamic HTML pages, also referred to as DHTML

Tutorials in this category will be focused on how to accomplish specific things using plain JavaScript and popular JavaScript libraries such as JQuery.

Most of the guides are beginner-friendly, but some scripting knowledge may be required for others.