-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdom_check.html
26 lines (20 loc) · 984 Bytes
/
dom_check.html
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
<!DOCTYPE html>
<html>
<h6>Checking document object model by Tag Name</h6>
<h6>Checking document object model by Tag Name</h6>
<h6>Checking document object model by Tag Name<h6>
<h5 id="dom1">Checking document object model by Id dom1</h5>
<h5 id="dom2">Checking document object model by Id dom2</h5>
<h5 id="dom3">Checking document object model by Id dom3</h5>
<script>
let h6 = document.getElementsByTagName("h6");
for(i=0;h6[i];i++)
document.write("Header Elements: " + h6[i].innerHTML + "<br/>");
var h5 = document.getElementById("dom1");
document.write("Header Elements: " + h5.innerHTML + "<br/>");
var h5 = document.getElementById("dom2");
document.write("Header Elements: " + h5.innerHTML + "<br/>");
var h5 = document.getElementById("dom3");
document.write("Header Elements: " + h5.innerHTML + "<br/>");
</script>
</html>