-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmyscript.js
More file actions
34 lines (27 loc) · 752 Bytes
/
myscript.js
File metadata and controls
34 lines (27 loc) · 752 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
32
33
34
var button = document.getElementById('myButton');
var modal = document.getElementById('myModal');
var cls = document.getElementById('myClose');
var test = document.getElementById('test')
var content = document.getElementById('myContent')
button.onclick = function() {
modal.style.display = "block";
setTimeout(opacity1, 100);
}
cls.onclick = function() {
content.style.opacity = '0';
setTimeout(cls1, 1000);
}
function cls1() {
modal.style.display = "none";
}
test.onclick = function() {
test.style.backgroundColor = 'red';
test.style.marginLeft = '100px';
test.style.marginTop = '100px'
}
content.onclick = function() {
modal.style.display = 'block';
}
function opacity1() {
content.style.opacity = '1'
}