-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
20 lines (16 loc) · 742 Bytes
/
Copy pathapp.js
File metadata and controls
20 lines (16 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Document
// console.log(document.getElementById("items-list"));
// // getting the id
// console.log(document.getElementById("items-list").id);
// const Myitems = document.getElementById("items-list");
// Myitems.style.color = "#fcfcfc";
// Myitems.style.background = "#000";
// Myitems.textContent = "Item-list";
// Myitems.innerHTML = "<span>New List</span>";
// console.log((document.body.innerHTML = "<span>Hellow Mahir</span>"));
// document querySelector
console.log(document.querySelector("#items-list"));
console.log(document.querySelector(".card"));
document.querySelector("li").style.color = "red";
document.querySelector("li:last-child").style.color = "blue";
document.querySelector("li:nth-child(2)").style.color = "green";