-
Notifications
You must be signed in to change notification settings - Fork 0
/
tut29.js
18 lines (13 loc) · 822 Bytes
/
tut29.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Searching of DOM
// This includes functions in which we call an object with help of getElementById and getElementByClass
// These are importants functions that are used the most
// For Example in this all the elements having class name will be selected in name1 variable
// let name1 = document.getElementById("name")
// In this it will select all the elements having class name1
// let name2 = document.querySelectorAll(".name1")
// This will select all the anchor tag and display them
// console.log(document.getElementsByTagName("a"))
// This will return all the anchor tags in the class card
// console.log(document.querySelector(".card").getElementsByTagName("a"))
// This will return all the tags jiske name me search hoga yeh mostly input tags me hoga
// console.log(document.getElementsByName("search"))