-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
62 lines (52 loc) · 1.1 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Soldier</title>
<link rel="stylesheet" href="style.css">
<style>
body {
margin: 0;
background-color:#eeddd;
}
div{
position:absolute;
}
div form{
z-index:9999;
}
</style>
<!-- <script type="module" src='./main.js'></script> -->
</head>
<body>
<div>
<form name="myForm">
请输入想看的序号: <input type="text" name="inputBox" value = '1'>
<input type="button" value="点击获取案例" onclick="getInputValue()">
<input type="button" value="重置" onclick="reload()">
</form>
<script type="importmap">
{
"imports": {
"three": "./files/three.module.js"
}
}
</script>
<script>
function getInputValue() {
let inputVal = myForm.inputBox.value;
switch (Number(inputVal)) {
case (1):
import('./main.js');
break;
case (2):
import('./main2.js');
break;
}
}
function reload() {
location.reload();
}
</script>
</body>
</html>