-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
50 lines (43 loc) · 1.56 KB
/
demo.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
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Combobox</title>
<style>
div.combobox {font-family: Tahoma, sans-serif;font-size: 12px}
div.combobox {position: relative;zoom: 1}
div.combobox div.dropdownlist {display: none;width: 200px;
border: solid 1px #000;background-color: #fff;
height: 200px;overflow: auto;position: absolute;
top: 18px;left: 0px;}
div.combobox .dropdownlist a {display: block;text-decoration: none;
color: #000;padding: 1px;height: 1em;cursor: default}
div.combobox .dropdownlist a.light {color: #fff;
background-color: #007}
div.combobox .dropdownlist, input {font-family: Tahoma;font-size: 12px;}
div.combobox input {float: left;width: 182px;
border: solid 1px #ccc;height: 15px}
div.combobox span {border: solid 1px #ccc;background: #eee;
width: 16px;height: 17px;
float: left;text-align: center;border-left: none;cursor: default}
</style>
</head>
<body>
<h1>Editable combobox</h1>
<!-- HTML code -->
<div class="combobox">
<input type="text" name="comboboxfieldname" id="cb_identifier">
<span>▼</span>
<div class="dropdownlist">
<a>Item1</a>
<a>Item2</a>
<a>Item3</a>
</div>
</div>
<!-- JS code -->
<script type="text/javascript" charset="utf-8" src="combobox.js"></script>
<script type="text/javascript" charset="utf-8">
var no = new ComboBox('cb_identifier');
</script>
</body>
</html>