-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexpedition_form.html
30 lines (30 loc) · 1.21 KB
/
expedition_form.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>
<script>
function get_image_list(images) {
result = [];
for (var i = 0; i < images.files.length; i++) {
result[i] = images.files[i];
}
return result;
}
function get_form() {
var dict = {};
dict['name'] = document.getElementById('name').value;
dict['date'] = document.getElementById('date').value;
dict['images'] = get_image_list(document.getElementById('images'));
dict['description'] = document.getElementById('description').value;
return dict
}
</script>
</head>
<body>
<p>Expedition name: <input type="text" name="ex_name" id="name"></p>
<p>Expedition date: <input type="date" name="ex_date" id="date"></p>
<p>Images: <input type="file" name="images" accept="image/*" id="images" multiple></p>
<p>Write a short description of the expedition: </p>
<p><textarea id="description" name="description" rows="4" cols="50"></textarea></p>
<button onclick="get_form()">Submit</button>
</body>
</html>