-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest
More file actions
49 lines (45 loc) · 1.18 KB
/
test
File metadata and controls
49 lines (45 loc) · 1.18 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<form name="form1">
<h4>Aufgabe</h4>
<input type="text" name="aufgabe" placeholder="Do be do be do" required/>
<h4>erledigt bis</h4>
<input type="date" name="date" required/>
<h4>Kategorie</h4>
<select name="kategorie" required>
<option>Privat</option>
<option>Arbeit</option>
<option>Schule</option>
</select>
<br/><br/>
<input type="submit" value="Aufgabe speichern" id="submitButton" />
</form>
<table>
<theader>
<tr>
<td>Aufgabe</td>
<td>bis</td>
<td>Kategorie</td>
</tr>
</theader>
<tbody id="aufgaben"></tbody>
</table>
<script>var button = document.querySelector('#submitButton');
button.addEventListener('click', function(){
var content = {
kategorie: document.forms["form1"]["kategorie"].value,
console.log(document.forms["form1"]["aufgabe"].value);
console.log(document.forms["form1"]["date"].value);
};
var row = document.createElement('tr');
var td = document.createElement('td');
})
</script>
</body>
</html>