Month: May 2021

Task Using Traversing Elements in DOM

Task 1 : In the below task find all the next sibling of "spl" id H1 Tag  <div id="demo">                 <h1>This is Heading...
READ MORE   >>

Traversing Elements in DOM

Get the parent element – get the parent node of an element. Get child elements – get children of an element. Get siblings of an element – get siblings of an element. Get the parent...
READ MORE   >>

Task using Selecting Elements in Dom

Task 1 Find the count of h2 tags using Dom by click Event via ID <!DOCTYPE html> <html> <head> <script> function demo() { let btn = document.getElementById('btnCount'); let headings =...
READ MORE   >>

Selecting Elements in DOM

getElementById() – select an element by id. getElementsByName() – select elements by name. getElementsByTagName() – select elements by a tag name. getElementsByClassName() – select elements by one or more class names. ...
READ MORE   >>

Recent Comments

    • Copyright © 2020 (Er. Shairy Kalra). All Rights Reserved