Ưu đãi trong tuần: Nhập mã UD50 giảm 50k cho đơn từ 300k!
Trang chủ
Menu

JavaScript DOM Create Interactive Dynamic Web Pages

JavaScript DOM - Tạo Trang Web Tương Tác Động

JavaScript DOM - Tạo Trang Web Tương Tác Động

Học cách làm cho trang web trở nên động và tương tác bằng JavaScript để tác động và thao tác các phần tử trang

4.5
(256 đánh giá)
11,138 học viên
Giảng viên
Laurence Svekis
Phụ đề Việt chất lượng cao Phụ đề tiếng Anh Bán chạy Đánh giá cao
50.000đ 429.000đ -88%
✓ Xem giỏ hàng và thanh toán
Bao gồm phụ đề tiếng Việt, tiếng Anh
19.5 giờ video
111 bài giảng
Truy cập vĩnh viễn
Học trên mọi thiết bị
Cập nhật: 31/05/2026

Bạn sẽ học được gì

Hiểu rõ hơn các nguyên lý cốt lõi của JavaScript
Tạo ra các tương tác động trên trang web
Cập nhật các phần tử HTML
Thay đổi kiểu dáng phần tử
Thêm các trình kích hoạt sự kiện

Yêu cầu

Có mong muốn học hỏi
JavaScript trình độ trung cấp
Có máy tính
Kiến thức về HTML
Kinh nghiệm phát triển Web

Đối tượng phù hợp

Bất kỳ ai muốn mở rộng kiến thức JavaScript
Bất kỳ ai muốn tìm hiểu thêm về cách hoạt động của DOM
Nhà phát triển JavaScript muốn học về DOM
Nhà phát triển HTML CSS JavaScript

Nội dung khóa học

8 phần • 111 bài giảng
1 Cách tạo Trang Web Động Tương Tác với Giới thiệu JavaScript
2 Hướng dẫn thử thách và mã nguồn cho các bài học JavaScript
3 Bắt đầu viết mã: cách code với JavaScript
4 Bắt đầu viết mã: cách code với JavaScript và thêm JavaScript
5 Mẹo Code JavaScript và học cách bắt đầu với JavaScript
6 Cách sử dụng biến trong JavaScript
7 Chuyển đổi kiểu động trong JavaScript là gì và nó hoạt động thế nào
8 Quy tắc đặt tên biến: cách khai báo biến JavaScript
9 Mảng và Đối tượng trong JavaScript với các ví dụ code
10 Hàm JavaScript: cách hàm được dùng trong code
11 Document Object Model JavaScript cho trang web tương tác
12 Phương thức DOM với JavaScript để chọn phần tử HTML trên trang
13 Điều kiện logic với JavaScript: câu lệnh if và Switch
14 Toán tử trong JavaScript: cách áp dụng toán tử
15 Toán tử ba ngôi: câu lệnh điều kiện một dòng trong JavaScript
16 Giá trị ngẫu nhiên Math: lấy số ngẫu nhiên trong JavaScript
17 Vòng lặp For, While, Do While: chạy các khối lệnh
18 Đối tượng JavaScript: cách sử dụng đối tượng trong code
19 Xây dựng đối tượng với code JavaScript
20 Các phương thức mảng JavaScript phổ biến để cập nhật giá trị mảng
21 Duyệt nội dung mảng: phương thức forEach và vòng lặp for cho dữ liệu mảng
22 Phương thức mảng cho các mục trong mảng: code JavaScript
23 Phương thức mảng để sắp xếp các mục mảng bằng Mảng ngẫu nhiên JavaScript
24 Ví dụ phương thức mảng JavaScript để tìm các mục trong mảng
25 Phương thức chuỗi JavaScript: chức năng phổ biến
26 Trò chơi xáo chữ tương tác với JavaScript: xáo trộn chữ trong chuỗi
27 LocalStorage với JavaScript: JSON parse và Stringify các đối tượng
1 Giới thiệu về JavaScript và DOM
2 Trang web động và tương tác với JavaScript DOM: tải hướng dẫn PDF
3 Giới thiệu về JavaScript và DOM: cách tạo trang web tương tác
4 Tạo và xóa phần tử với code JavaScript
5 Danh sách: di chuyển phần tử từ cha sang phần tử khác, mục sang danh sách khác với JavaScript
6 Sự kiện AddEventListener OnLoad và DOM loading trong JavaScript
7 Ví dụ JavaScript: giá trị trường nhập liệu và chọn trong Form, và tạo phần tử
8 Sự kiện chuột và bàn phím DOM: trình lắng nghe sự kiện trang tạo tương tác
9 RequestAnimationFrame JavaScript: tạo hoạt ảnh mượt trong DOM với bóng nảy
1 Giới thiệu về dự án code với JavaScript DOM: trang web động
2 Mã nguồn phần và hướng dẫn tải bài học
3 Bảng màu nền thú vị: tạo bảng với JavaScript
4 Chọn và hoán đổi phần tử trong DOM: code JavaScript
5 Modal động JavaScript từ đối tượng dữ liệu: tạo Modal bằng code
6 Bộ đếm nhấp trang: tạo bộ đếm nhấp tương tác động
7 Trình tạo từ ngẫu nhiên với phương thức chuỗi JavaScript
8 Thanh cuộn theo dõi: tính toán vị trí cuộn trên trang
9 Câu đố toán và bộ đếm bắt đầu/dừng với JavaScript
10 Trò chơi trí nhớ DOM tương tác động JavaScript: CSS Grid và logic trò chơi
11 Trò chơi tung đồng xu động JavaScript: thử thách code trò chơi DOM
12 Trò chơi thẻ bài chiến đấu JavaScript: sử dụng phương thức mảng
1 Mã nguồn dự án DOM
2 Dự án code JavaScript: SetInterval lặp lại code
3 Dự án code JavaScript: GetTime cho bộ đếm thời gian dùng Date
4 Dự án code JavaScript: Giờ và ngày kể từ dấu thời gian millisecond Epoch
5 Dự án trò chơi gõ chữ JavaScript từ đầu: hiển thị từ ngẫu nhiên và trò chơi độ chính xác
1 Chọn phần tử
2 Lưu đối tượng vào LocalStorage: ví dụ code JavaScript
3 JSON Parse lưu đối tượng vào LocalStorage: ví dụ code
1 Mã nguồn ví dụ code
2 Khai báo biến: phạm vi khối Let và Const
3 Vòng lặp duyệt với for in và for of: ví dụ JavaScript
4 Đồng hồ đếm ngược trên trang web DOM bằng JavaScript
5 Đối tượng chữ JavaScript
6 Thể hiện đối tượng JavaScript: giá trị riêng tư
7 Toán tử Spread trong JavaScript
8 Đếm nguyên âm trong chuỗi với RegExp
9 Hiệu ứng mờ dần thuần JavaScript
10 Đổi màu nền
11 Tải và hiển thị dữ liệu
12 Xác thực biểu mẫu
13 Chuyển đổi hiển thị ảnh
14 Trò chơi đoán số
15 Tạo danh sách việc cần làm
16 Máy tính đơn giản
17 Nội dung theo tab
1 Kéo và thả
2 Làm phẳng mảng lồng
3 Chú thích tùy chỉnh
4 Tạo Modal bằng JavaScript
5 Tài liệu học tập bổ sung
1 Lưu ý: các bài học trong phần này thuộc phiên bản cũ
2 Giới thiệu về DOM
3 Thiết lập tài nguyên khóa học
4 DOM là gì
5 Tài nguyên DOM
6 Chọn giá trị Node bằng JavaScript
7 Đối tượng JavaScript và chọn trong DOM
8 Mã nguồn Đối tượng JavaScript
9 Mô hình đối tượng cửa sổ
10 Phương thức document write
11 Chọn phần tử theo ID
12 Cập nhật nội dung div đầu ra từ biểu mẫu nhập liệu
13 Mã nguồn: nhập liệu để cập nhật div đầu ra
14 Chọn phần tử theo tên thẻ
15 Chọn phần tử theo lớp
16 Mã nguồn chọn phần tử
17 document query Selector
18 Chọn giống như CSS
19 Mã nguồn Query Selection
20 Duyệt DOM
21 Thử thách mã nguồn
22 Thêm kiểu dáng động vào phần tử
23 Mã nguồn tạo kiểu
24 Thêm và xóa phần tử bằng JavaScript
25 Mã nguồn Thêm và Xóa
26 Thêm trình lắng nghe sự kiện vào phần tử bằng JavaScript
27 Sự kiện lắng nghe: sự kiện nhấp chuột
28 Mã nguồn Trình lắng nghe sự kiện
29 Di chuột qua phần tử để đổi màu nền
30 Mã nguồn Di chuột
31 Cửa sổ popup ảnh
32 Mã nguồn cửa sổ popup ảnh
33 Danh sách tài nguyên

Giới thiệu khóa học

Learn how to make your HTML and CSS code interactive and dynamic!  JavaScript can interface with the Document Object Model and help make webpage elements come to life!   Interact with web users via event listeners make your web pages respond to users and code.

Enroll now to get instant access to:

  • 10+ hours of lessons

  • 60 page downloadable workbook for Section 1 includes source code, tips, resources and challenges

  • 27 page downloadable workbook for Section 2 includes source code, tips, resources and challenges

  • 65 page downloadable workbook  for Section 3 includes source code, tips, resources and challenges

  • Premium instructor support to help you learn

  • Lifetime access to course updates

10 NEW coding Projects added - 5.5hrs NEW video content

  1. Background Color Table Fun Create Table with JavaScript

  2. Element Selector and Swap of Elements within the DOM JavaScript Code

  3. JavaScript Dynamic Modal from Data Object Create Modals with Code

  4. Page Clickers Create Dynamic Interactive Click Counters

  5. Random Words Maker with JavaScript String Methods

  6. Scrollbar scroll tracker Calculate the Scroll position on the page

  7. Math Quiz and Start and Stop Counters with JavaScript

  8. Dynamic Interactive JavaScript DOM memory Game

  9. Dynamic JavaScript Coin Flipping game DOM game.

  10. JavaScript Battle Cards Game using Array methods


JavaScript holds the key to selecting and changing web page elements.   The Document Object Model is a model of your HTML document represent within JavaScript as objects.  Your browser builds the DOM and JavaScript can be used to connect to it selecting and accessing data contained within the DOM.  All the web page elements are represented within the DOM.  Elements are within the HTML page rendered out by the browser.  JavaScript engine in the browser then create representations of the elements as JavaScript Objects

See how easy it is to select elements and make the interactive.

Explore JavaScript and how you can start coding JavaScript that will be able to interact with the Web page elements.

Section 1 Basic of Coding JavaScript

Covers all the fundamentals to code JavaScript - with examples and coding challenges in each lesson.

Explore how to get started with code, setup you developer environment.  Create HTML files and connect your Javascript to the page elements.

JavaScript coding best practices with tips and resources.   How to setup and use variables within your code.  Different data types and how JavaScript manages the values.  What functions are and how to use them in your code.  DOM and how JavaScript code can use the DOM to connect, update and manipulate web page elements.   

Lessons in the section include :

  • Introduction to how JavaScript works and how you can write JavaScript code

  • Getting started writing code how to code with Javascript

  • JavaScript Code Tips

  • How to use variables in JavaScript

  • JavaScript Dynamic Type Conversion

  • Variable naming Rules

  • Arrays and Objects in JavaScript

  • JavaScript Functions

  • JavaScript Document Object Model

  • DOM methods with JavaScript

  • Logic Conditions with JavaScript

  • Operators in JavaScript

  • Ternary Operator JavaScript

  • Math Random Values

  • JavaScript For and While Loops

  • JavaScript Objects

  • Object Construction with JavaScript

  • Common JavaScript Array Methods

  • Looping through Array contents

  • Array Methods for Items

  • Array Methods for Sort

  • JavaScript Array Method Examples

  • JavaScript String Methods

  • Word Scramble Game

  • JavaScript JSON parse and JSON.Stringify()

JavaScript is everywhere - all your favorite websites and also the ones you don’t like use JavaScript. Makes your web content come to life - JavaScript allows for interaction with content and makes things happen. JavaScript is the dynamic programming language that, when applied to an HTML document, can provide dynamic interactivity on websites. Used in all browsers it's the most popular coding language ever. Websites and web apps everywhere are using JavaScript. It runs directly in your browser and you can create html files with a text editor directly on your computer to run in your browser. Select the html file and open it with any browser.

Code is a set of instructions for what you want to happen. Example : When a new person comes to your website, ask their name. Showing a welcome message with their name would be an example of something you might ask JavaScript to do. The instructions for the code would be to provide the user an input area, get the input value of their name, then use that value to return a response. Select a page element and update the contents of the element with the welcome message including the value of the input for the user's name.

Getting started with JavaScript is easy: all you need is a modern Web browser. Create an index html file and open it in a browser Add JavaScript to the html either linking to a script file or JavaScript directly between the script tags in the HTML.

From an instructor with over 18 years of real world web development experience, here to help you learn how to use the DOM for your web projects.  Ready to answer any questions you may have!

The DOM is like a doorway to access all of this functionality that is already there.  JavaScript gives you the ability to open up that door and make amazing things happen on your website.  This course covers only the JavaScript Document Object Model and prior JavaScript knowledge is a prerequisite to this course.

This course has everything you need to start creating your own interactive JavaScript code.  This is a step by step guide explaining how and why JavaScript DOM is used.  

Lesson JavaScript Coding Exercise :

  1. Create an HTML file and a JS file.

  2. Use the script tags to link to the JS file as the source file.

  3. Using the document.write() add text to the webpage.

  4. Using the document.write() add html formatted content to your webpage.

JavaScript Code Tips

  • Use Comments when possible single or multiple line

  • Indent using whitespace to make the code readable

  • Create code in a separate JS file and link to it from the HTML file

  • Use the console for debugging and to see values

How to use variables in JavaScript

  • Variables are one of the basic concepts of coding

  • Using const or let avoid using var

  • const and let are scope based

  • Parent scope vs local scope

  • Assign values to variables and reassign new updated values

  • Use of strings and numbers as values for variables

  • Dynamic type with JavaScript changing data type

  • Math and output from JavaScript directly

JavaScript Objects how to use Objects in code

One of JavaScript's data types is an object. These can be used to store various keyed collections and even more complex entities. The document is a giant object that contains a lot of entities. Learning more about objects will help better define what can be done with the DOM entities, how they behave and why as well as how they can be used.

JavaScript Document Object Model for interactive web pages

The Document Object Model (DOM) is an object that contains a data representation of the page elements. The DOM is structured in a tree like format, as objects that comprise the web page and content of the HTML web document. Document Object Model (DOM) is a programming interface for HTML documents, that is the logical structure of a page and how the page content can be accessed and manipulated. Bring your web pages to life with JavaScript and connect to the web page elements. Accessing the DOM you can create fully interactive content that responds to the user. DOM and JavaScript lets you create Dynamic web page content that can change without page refresh and present new elements and updated content to the user. Improve your web users experience with JavaScript and the DOM. What is the DOM Document Object Model How to select elements from your webpage with JavaScript Manipulate and change your page elements with JavaScript How to set styling attributes for elements Make them interactive with Event listeners DOM events and Page events with JavaScript How to create elements with code and add them to your webpage Moving elements and animation of elements.

DOM methods with JavaScript select HTML page elements

There are methods in the Document object that allow us to better select elements we want to manipulate with code. querySelector() and querySelectorAll() allow JavaScript to select page elements from the content within the document object.

JavaScript querySelectorAll Get Page Elements Select ALL. Use of querySelector and querySelectorAll to select matching page elements. Different selectors including tag, id, and class. Select page element, iterate contents of node list output and update page elements.

Logic Conditions with JavaScript if Statement Switch

Conditions can be used within code to apply logic, and run different actions based on the result of the condition. Depending on the value either True or False the code can run different blocks of code.

The if statement will check a condition, if true it runs the specified code. If false it does not run the code. Else provides an alternative if the condition is not true then else statement allows us to run a block of code on false if none of the previous conditions are true. You can also use the else if statement to check another condition with a separate block of code to be run if the previous condition came back as false.

Using the switch statement allows us to specify several alternatives checking to see if any of the conditions match and allow the corresponding code to be executed.

Math Random Values JavaScript get Random Numbers

JavaScript Math object contains various methods that can be used for math functionality, in addition it also contains the random method that creates random values in JavaScript. The Math.random() method returns a floating-point number in the range 0 (inclusive of 0) to less than 1 (not including 1). The random value can then be multiplied and rounded to the nearest whole number to include the randomized range of values desired by the developer.

Random values are ideal for games and to create unique custom experiences for web users.

JavaScript For, While Do While Loops Run blocks of code

Loops allow us to execute blocks of code a number of times, they also allow us to iterate through a list of items such as items in an array or other iterable list.

Loops will always require several parameters, such as a starting value, a condition to stop the loop and a way to move through the items to the next item in the loop. We can set up a simple for loop by setting a variable to use with a starting value, then applying a condition to continue the loop if the condition is true, and incrementing the value of the variable so that eventually the condition is no longer true.

JavaScript Objects how to use Objects in code

One of JavaScript's data types is an object. These can be used to store various keyed collections and even more complex entities. The document is a giant object that contains a lot of entities. Learning more about objects will help better define what can be done with the DOM entities, how they behave and why as well as how they can be used.

Arrays are also objects as a data type but they contain specific properties that allow the developer to interact with the contents of the array and its data.

arr.push(val); // add to array return the array length

arr.pop(); //remove last

arr.shift(); //remove first item

arr.unshift(val); //add to the front of array array length returned

arr.splice(1); // return array with all items after the index of 1

splice(start, deleteCount, val); //changes the contents of an array

slice(start, end); // returns a copy of a portion of an array into a new array

arr.slice(); //duplicate array as new array

arr.slice(5); // return array items from index 5

arr.slice(1,4); // return portion of array using slice

arr.toString(); // returns a string representation of the array items

arr.join(' - '); // returns a string representation of the array items using the argument value as a separator for the items in the array.

Introduction to how JavaScript works and how you can write JavaScript code

  • JavaScript is a core technology on the web alongside HTML CSS

  • JavaScript runs in the browser and gets rendered by the browser within the HTML page.

  • You can connect to HTML elements, using the HTML DOM which is a programming interface for JavaScript to add, update and remove HTML elements.

  • HTML elements can be accessed as objects that have properties, methods, and events.

  • Code is a set of instructions that tells the application in a language that can be understood by it, what to do.

  • JavaScript code is single threaded, which means that only one thing can happen at a time on the thread. Other requests get blocked until an operation completes and then those requests will run.

  • How to write code using a code editor or IDE.

  • How the elements from the HTML code are represented within the DOM tree structure, and that you can navigate from one to another.

  • What Devtools are and how you can use them

  • How you can use console log and console dir methods within the DevTools to view the document object and see the contents of the page elements in the DOM.

  • How to add JavaScript code within your HTML file and run the JavaScript code in your browser.

  • JavaScript commenting in the code and how to make your code more readable.

HTML is the markup language used to structure and provide meaning to the web content. CSS is the language used that contains the rules for styling the HTML content. JavaScript is the scripting language that allows you to create interactive and dynamic content within the web page.

You can do a lot with JavaScript such as store values, run blocks of code, apply logic with conditions and add events to your page elements. There is a lot you can do with JavaScript and the possibilities are endless.

APIs- are sets of prebuilt building blocks that allow developers to connect into and access these objects. Think of it like a control panel which JavaScript language lets you interact with.

Browser APIs allow access to the web page elements, and other data. You can access the API and do useful programming things. The DOM ( Document Object Model) API allows you to manipulate the HTML and CSS of the page.


  • Learn how to select HTML elements via tags, id, class and queryselection

  • traverse elements move between elements to properly select the ones you are looking for

  • Find out about nodes and how they work

  • Get data from the DOM about your page and elements

  • Update your element CSS via JavaScript

  • Add interactive listeners for page events

  • Explore how JavaScript objects work

  • Append and remove elements Dynamically

  • Useful code snippets

  • Source Code is included

  • Top resources and more

  • Everything is included for you to get started quickly

JavaScript is powerful, and the DOM really demonstrates this!

This course is designed to cover core aspects of JavaScript and cover the Document Object Model (DOM).

This course will demonstrate how to use the DOM and will help you develop skills how to manipulate the DOM within you website.   JavaScript is one of the most in demand skills, and learning how to use JavaScript will help to separate you from the crowd.   Want to know more, what are you waiting for take the first step.  Join now to start learning how you too can create DYNAMIC and INTERACTIVE pages within your website today.


Please note that previous JavaScript and HTML experience is a requirement as the content of the course is to introduce the Document object model and how to connect JavaScript to the browser DOM.  This course only covers JavaScript as it relates to the DOM and the scope is to cover Document Object related content

Khóa học liên quan

Khám phá thêm các khoá học cùng chủ đề

Hiển thị tất cả khoá học Dom Manipulation
Hiển thị tất cả khoá học Frontend Development
Hiển thị tất cả khoá học Javascript
Hiển thị tất cả khoá học Web Development
Zalo
Tôi có thể tư vấn khoá học cho bạn 😊