-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
30 lines (27 loc) · 1.24 KB
/
index.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
27
28
29
30
<!DOCTYPE html>
<html>
<head>
<title>PLoading Sample</title>
</head>
<body style="background-color: #90caf9;">
<div style="position: fixed; z-index: 10001; color: white;" id="nn">
Content:
<input id="cc" placeholder="[PLoading] realtvop is best!">
ID:
<input id="dd" placeholder="sample">
<input type="button" id="aa" value="l">
<input type="button" id="bb" value="r">
</div>
<script type="module">
import ploading from './ploading.js';
ploading.init({ whenShow: () => document.getElementById("nn").style.color = "white", whenHide: () => document.getElementById("nn").style.color = "black" });
ploading.l(document.getElementById("cc").placeholder, document.getElementById("dd").placeholder);
document.getElementById("aa").addEventListener("click", () => {
ploading.l(document.getElementById("cc").value || document.getElementById("cc").placeholder, document.getElementById("dd").value || document.getElementById("dd").placeholder);
});
document.getElementById("bb").addEventListener("click", () => {
ploading.r(document.getElementById("dd").value || document.getElementById("dd").placeholder);
});
</script>
</body>
</html>