Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
JavaScript DOM for Beginners Learn how to code
Rating: 4.6 out of 5(149 ratings)
14,814 students

JavaScript DOM for Beginners Learn how to code

JavaScript DOM coding examples learn how to create interactive and dynamic web pages Element selection and updating
Created byLaurence Svekis
Last updated 11/2024
English
English [Auto],

What you'll learn

  • How to use JavaScript
  • How to create elements dynamically
  • Manipulate elements using JavaScript

Course content

5 sections67 lectures5h 49m total length
  • Introduction to the DOM JavaScript coding for interactive page elements1:45

    Learn to use JavaScript to select and interact with dom elements, update styling, set attributes, and add event listeners for dynamic pages. Practice code and exercises, animation with requestAnimationFrame.

  • Section Lesson Source Code and JavaScript DOM coding Examples6:17
  • Document Object and Setup.8:14

    Learn to set up and interact with the document object model, inspect inner HTML and properties, and update the page using the console and DOM methods.

  • Page Element Selection.13:59

    Explore various methods to select page elements in JavaScript, including getElementById, getElementsByClassName, getElementsByTagName, and querySelector, and learn how HTML collections and node lists differ.

  • Element Selection Challenge2:15

    Learn to select div elements with the class output, loop through them with forEach, and update each element's inner html to display its index value while preserving the original class.

  • Adding and Removing Elements11:39

    Create and append elements with document.createElement, innerHTML, and append or appendChild, then remove elements via the parent node. Select outputs by class, update content, and preplan elements with a loop.

  • DOM Element Style JavaScript Code DOM8:20

    Explore how to manipulate dom elements with JavaScript by creating divs, applying inline styles via the style property, and adjusting border, display, text alignment, margins, padding, width, and colors.

  • JavaScript Code DOM Click Events Element Interaction8:12

    Explore how to create interactive page elements with JavaScript DOM by handling click, mouse down/up, and mouse over/out events, updating a counter and text content in real time.

  • JavaScript DOM elements Event Object E Parameters4:31

    Explore the JavaScript dom event object, accessing type, target, path to the triggering element, and event parameters such as x-y position and pointer type to display updates on click.

  • Event Listeners vs Handlers for page elements3:55

    Explore the difference between event handlers and event listeners for page elements, showing how handlers overwrite and how addEventListener enables multiple listeners, with practical console examples.

  • Adding Event Listeners to Elements11:59

    Learn how to attach click event listeners to elements, control event flow with use capture and options, and observe event object and target through multiple nested elements.

  • JavaScript Event Listeners7:21

    Explore JavaScript event listeners - click and mouse enter/leave/over/out - update the main content area's output content, track event objects, and manipulate the DOM with createElement and querySelectorAll.

  • Events on Form Fields DOM page elements6:48

    Create multiple input fields, attach focus, focusout, change, and keydown/keyup listeners, and log event details like code, key, and keyCode to the console while rendering inputs in an output container.

  • List Exercise3:21

    Listen for changes on a number input, then dynamically build an unordered list with that many items. Update and clear the output as the input value changes.

  • DOM Content Loaded Event.3:10

    Learn to use the DOMContentLoaded event to run scripts after the page loads and to safely interact with page elements, regardless of script placement.

  • Window Object and Events2:55

    Explore the window object as the top level container holding the document. Add resize and scroll listeners, log inner width and height, and output the event object to the console.

  • DOM element attributes7:22

    Master DOM element attributes by selecting elements, updating input type, min, max, and required, then creating image and anchor elements with proper src, href, and target.

  • Element Get and Has attribute4:57

    Select all anchor tags, use getAttribute and hasAttribute to check targets, and setAttribute when needed to make every link blank.

  • Adding and removing Classes5:36

    Learn to use element.classList to add, remove, contains, and toggle classes with click events. Create and append elements and update text with template literals, applying red and blue color classes.

  • Traversing between elements8:51

    Learn to traverse the DOM by navigating between elements, access parent and siblings, work with node lists and child counts, handle click events, and build and append new elements.

  • Dynamic DOM page element List Exercise.20:37

    Create a dynamic DOM list that users can add to, edit, delete, and strike through items, using contenteditable, createElement, and event listeners.

  • requestAnimationFrame movement8:09

    Move a page element from the top-left toward x=200 using interval and requestAnimationFrame, updating left and top with absolute positioning to stop at 200.

  • Bouncing Ball Animation coding challenge10:40

    Create a red bouncing ball with JavaScript and the DOM, animating via requestAnimationFrame inside a 600 by 400 container, and toggle the motion by clicking the heading.

Requirements

  • Fundamental JavaScript concepts
  • Access to computer
  • Use of editor to write code
  • HTML and CSS knowledge

Description

Perfect course to learn more about JavaScript and how to apply JavaScript in real world applications.  Make your web pages come to life with JavaScript.  Create interactive and dynamic web page content today!!!  Learn how to animate page elements, use the page element object properties and values within your code.

Includes 30+ Page Downloadable Source Code and JavaScript Resource Guide

LifeTime Access with new updates - Professional support within the Q&A section.

JavaScript is used when creating interactive and dynamic web content. It allows you to bring your web pages to life. Almost all modern websites use JavaScript and becoming more familiar with how you can add Javascript code to interact and manipulate your web page elements will propel your web pages to the next level.

JavaScript DOM coding Lessons

  • Simple HTML page with innerHTML update

  • Page Element Selection

  • Select and update only divs with a class of output

  • Create Elements and Remove Elements

  • Page Element Style Property

  • Interactive Page elements Events

  • Event Object values

  • Event Listeners vs Event Handlers

  • UseCapture Event Listener Optional

  • Mouse Movement Events

  • Form Field Event listeners

  • List Exercise on events

  • Window Object WOM

  • DOM element attributes

  • Element Get and Has attribute

  • Adding and Removing Classes

  • Traversing between elements

  • List Exercise

  • requestAnimationFrame movement

  • Bouncing Ball Animation

JavaScript and the DOM Page Elements : JavaScript and the DOM

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. Create fully interactive content that responds to the user. 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.


  • Element Selection

  • DOM tree

  • Multiple Elements selection

  • Element Manipulation

  • Adding event listeners

  • Input Values

  • Create Elements

  • Animation

  • Element Movement

  • Window events

  • Document Events

  • Keyboard Events

  • Tracking key presses

Practice JavaScript while building fun interactive and dynamic min applications with JavaScript

Text area character counter

  • Events handlers

  • Keyboard events

  • Element manipulation

Text scroll box

  • Word scrolling

  • Mouse events

Fun with Elements

  • Clone elements

  • create and remove elements

  • animate elements

  • draw elements

  • attaching drag and more

No libraries, no shortcuts just learning JavaScript making it DYNAMIC and INTERACTIVE web application.

Step by step learning with all steps included.

Beginner JavaScript knowledge is required as the course covers only JavaScript relevant to the building of the game.  Also HTML and CSS knowledge is essential as scope of this course is all JavaScript focused.  

Along with friendly support in the Q&A to help you learn and answer any questions you may have.

Try it now you have nothing to lose, comes with a 30 day money back guarantee.  

Start building your own version of the game today!!!!


Who this course is for:

  • Beginners to JavaScript
  • Anyone who wants to practice writing JavaScript
  • Web developers
  • Webmasters
  • Anyone who wants to learn to make a JavaScript game without any libraries