-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprac.js
More file actions
59 lines (53 loc) · 1.18 KB
/
Copy pathprac.js
File metadata and controls
59 lines (53 loc) · 1.18 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
function badal()
{
var x = document.getElementsByTagName('H1');
var y = document.getElementsByTagName('H2');
var i;
for (i = 0; i < x.length || i < y.length; i++)
{
x[i].style.color = "red";
y[i].style.color = "blue";
}
}
function aray()
{
var y = [];
var i = 0;
for (i=0 ; i<5; i++)
{
var x = prompt ("PLEASE ENTER LOCATION " + i + " WORD ");
y[i] = x;
}
document.querySelector("#roko").innerHTML = y;
}
function qsa()
{
var gogo = document.getElementsByTagName("p");
var i;
for (i = 0; i < gogo.length; i++)
{
gogo[i].style.color = "orange";
}
}
function qscs() {
var gomo = document.querySelectorAll(".moron");
var ip;
for (ip = 0 ; ip < gomo.length; ip++)
{
gomo[ip].style.color = "blue";
}
}
function cola ()
{
var ImgNm = ["d1.png","d2.png","d3.png","d4.png"];
var i = 0;
i = Math.floor(Math.random() * 4);
var q = 0;
q = Math.floor(Math.random() * 4);
var patha = "d/" + ImgNm[i];
var pathb = "d/" + ImgNm[q];
var mea = document.getElementById('ima');
var meb = document.getElementById('yma');
mea.setAttribute("src",patha);
meb.setAttribute("src",pathb);
}