-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsj.js
70 lines (43 loc) · 1.34 KB
/
sj.js
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
60
61
62
63
64
65
66
67
68
69
70
function changeColor(color, ghatna){
let heading = document.getElementById('xyz');
if(heading.style.color === color){
return;
}
heading.style.color = color;
const allButtons = document.getElementsByTagName("button");
for(let i = 0;i < allButtons.length;i++){
const b = allButtons[i];
b.disabled = false;
}
const button = ghatna.target;
button.disabled = true;
}
function hide(){
let heading = document.getElementById('xyz');
heading.style.visibility = 'hidden';
}
function show(){
let heading = document.getElementById('xyz');
heading.style.visibility = 'visible';
}
function load(){
let before = document.getElementById('before');
before.style.display = 'none';
let after = document.getElementById('after');
after.style.display = 'block';
changeName();
}
function reLoad(){
let after = document.getElementById('after');
after.style.display = 'none';
let before = document.getElementById('before');
before.style.display = 'block';
}
function changeName(){
let enter = document.getElementById("texti").value.toUpperCase();
let texta = document.getElementById("xyz");
if(enter === ""){
return reLoad();
}
texta.innerHTML = enter;
}