-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJS006.html
More file actions
43 lines (41 loc) · 1.42 KB
/
JS006.html
File metadata and controls
43 lines (41 loc) · 1.42 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.blue{
color: blue;
}
</style>
</head>
<body>
<div id="specia">
<button class="someclass">First Option</button>
<button class="someclass">Second Option</button>
<button class="someclass">Last Option</button>
</div>
<div id="chess">
<p>C++ - Programming Language</p>
<p>C - Programming Language</p>
<p>C# - Programming Language</p>
<p>Java - Programming Language</p>
</div>
<script>
var a=document.querySelector('#specia .someclass');
a.style.color="yellow";
var tx=document.querySelectorAll('#special s');
for(var i=0;i<tx.length;i++){
tx[i].style.color="purple";
}
/*
//PROPERTIES
var x=document.getElementById('chess');
x.innerHTML = "<p>I really Love Python and JavaScript more than the Listed Ones</p>";
//This is used to replace elements in the Paragraph with this One.*/
var y=document.querySelector('p');
y.className="blue";
</script>
</body>
</html>