-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.html
33 lines (28 loc) · 982 Bytes
/
test.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css" />
<script src="main.js"></script>
</head>
<body>
<input type="file" webkitdirectory="" multiple="" name="files[]" id="files" />
<div id="jo"></div>
<script>
var input = document.getElementById('files');
input.onchange = function(e) {
var files = e.target.files; // File list
for (var i = 0; i < files.length; ++i) {
var fname = files[i].name;
var fpath = files[i].webkitRelativePath;
var ftype = files[i].type;
var fsize = files[i].size;
console.log(files[i]);
}
}
</script>
</body>
</html>