-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
67 lines (60 loc) · 1.4 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
63
64
65
66
67
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>React Tag List</title>
<style>
.tag_list{
border: 1px solid #ccc;
padding: 2px;
}
.tag_list input{
border: none;
outline: none;
display: inline-block;
padding: 4px 4px;
margin: none;
font-size: 0.88em;
}
.tag_list .tags_container{
display: inline-block;
}
.tag_list .tag{
color: #999;
font-family: 'Helvetica Neue', Arial, sans-serif;
margin-right: 2px;
border: 1px solid #ccc;
background: #efefef;
padding: 2px;
border-radius: 3px;
display: inline-block;
font-size: 0.88em;
}
.tag_list .delete-tag{
background: transparent;
border: none;
font-family: 'Helvetica Neue', Arial, sans-serif;
color: #999;
outline: none;
cursor: pointer;
font-size: 0.88em;
}
</style>
</head>
<body>
<p>Tag List Demo</p>
<div id="tag_list"></div>
<button id="submit">Submit</button>
<p id="output"></p>
<script src="dev-bundle.js"></script>
<script>
var output = document.getElementById('output'),
tags = document.querySelector('input[name="tags"]'),
button = document.getElementById('submit');
button.addEventListener('click', function(e) {
e.preventDefault();
output.innerHTML = tags.value;
});
</script>
</body>
</html>