English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

JavaScript Basic Tutorial

JavaScript Objects

JavaScript Functions

JS HTML DOM

JS Browser BOM

AJAX Basic Tutorial

JavaScript Reference Manual

JavaScript Tutorial

JavaScript is the most popular and widely used client-side scripting language.

Client-side scripts are scripts that run in web browsers.

JavaScript is used to add interactivity and other dynamic features to websites.

JavaScript is an object-oriented language and has some similarities in syntax with the Java programming language. However, JavaScript has no relation to Java.

This tutorial will help you learn the latest JavaScript knowledge from basic to advanced topics.

Examples in each chapter

Each chapter of this tutorial includes many practice examples, which you can use to try and test your own js in our online editor to expand your learning scope. The purpose of these examples is to help you better understand the usage of JavaScript.

Basic JavaScript example
<script>
    function showDate() {
        document.getElementById("output").innerHTML = new Date();
    }
</script>
Test and see‹/›

What can JavaScript do?

You can do more with JavaScript:

  • JavaScript can modify text content

  • JavaScript can change the style (CSS) and position of elements

  • JavaScript can change HTML attributes

  • JavaScript can hide and display HTML elements

  • JavaScript can add and remove HTML elements

  • JavaScript can monitor mouse clicks, hover events, and respond accordingly

  • JavaScript can create alert pop-up windows to display information or warning messages to the user

  • JavaScript can validate user input before submitting it to the server

Not only these, you can also use JavaScript for many other interesting operations.

Why Learn JavaScript?

JavaScript is one of the three languages that web developers must learn:

  1. Using HTMLDefine web page content

  2. Used to specify the layout of web pagesCSS

  3. JavaScriptAdd Interactivity and Other Dynamic Features

There are sufficient reasons why JavaScript is one of the most popular and in-demand skills in today's job market. JavaScript not only allows you to add powerful interactive features to websites but is also the foundation of many commonly used libraries (such as jQuery) and frameworks (such as AngularJS, ReactJS, and NodeJS). As a web developer, you must have a deep understanding of this language.

Basic Conditions

Before starting this tutorial, you do not need any JavaScript knowledge, but you should be familiar with HTML and CSS. It is recommended that you read the following tutorials before starting to use JavaScript:

If you are a beginner, start with the basics and gradually progress by learning a little bit every day.

We recommend that you read this tutorial in the order listed in the left menu.

JavaScript Reference

The reference section will provide detailed information about all properties, methods, events, HTML DOM objects, browser objects, and more.