-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDOM.js
More file actions
31 lines (24 loc) · 792 Bytes
/
Copy pathDOM.js
File metadata and controls
31 lines (24 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// window object
// console.log(window);
// window.console.log("log");
// window.alert("Hello");
// let response=window.confirm("Do you want to exit");
// if(response){
// }else{
// }
// let value=prompt("Enter your Ip adress");
// console.log(value);
// const heading1=document.getElementById("heading");
// TAG: get element by Tag name
// ID: get element by ID
// CLASS: get element by classname
// QUERY SELECTOR
// const v=document.querySelectorAll(".heading");
// console.log(v);
// const p= document.querySelector("#heading1-div > h1");
// h1.style="color:red";
// console.log(document.body);
// let div = document.getElementById("hero-section");
// div.innerHTML="Hello";
// const paragraphs= document.getElementsByClassName("para")[2];
// paragraphs.innerHTML="<b>changed</b>";