-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
76 lines (73 loc) · 2.53 KB
/
index.html
File metadata and controls
76 lines (73 loc) · 2.53 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>原生js实现无刷新上传文件并显示进度条</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="wrapper">
<div class="left">
<!--表单-->
<form enctype="multipart/form-data">
<table>
<tr>
<td>用户名</td>
<td><input type="text" name="user" required></td>
</tr>
<tr>
<td>密码</td>
<td><input type="password" name="pass" required></td>
</tr>
<tr>
<td>图片1</td>
<td><input type="file" name="imgs[]" required></td>
</tr>
<tr>
<td>图片2</td>
<td><input type="file" name="imgs[]" required></td>
</tr>
<tr>
<td>图片3</td>
<td><input type="file" name="imgs[]" required></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="提交" name="sub"></td>
</tr>
</table>
</form>
</div>
<!--结果预览-->
<div class="right">
<p>ajax无刷新界面返回结果:</p>
<table>
<tr>
<td>用户名</td>
<td><input type="text" id="user" readonly></td>
</tr>
<tr>
<td>密码</td>
<td><input type="text" id="pass" readonly></td>
</tr>
</table>
<ul>
<li> 头像1
<img src="" class="imgs" alt="头像1">
</li>
<li> 头像2
<img src="" class="imgs" alt="头像1">
</li>
<li> 头像3
<img src="" class="imgs" alt="头像3">
</li>
<li> 上传进度
<meter value="0"></meter>
<span>0%</span>
</li>
</ul>
</div>
</div>
<script type="text/javascript" src="js/index.js"></script>
</body>
</html>