您的位置:首页 > 其它

用于web开发的带查询功能的combobox控件

2009-09-24 08:29 387 查看
asp.net+c#制作网站是不支持combobox控件的,只能使用dropdownlist控件,但有些功能还是不能和combobox相媲美。现在给出一个完整的列子供大家参考

11Global_run_event_hook = true;
12Global_combo_array = new Array();
13
14Array.prototype.remove=function(dx)
15
27function ComboBox_make()
28
58function ComboBox_choose(realval,txtval)
59
66function ComboBox_mouseDown(e)
67
89function ComboBox_handleKey(e)
90
115function ComboBox_update()
116
143
144function ComboBox_remove(index)
145
149function ComboBox_add()
150
159function ComboBox_build(arr)
160
184function ComboBox_toggle()
185
209function ComboBox()
210
242ComboBox.prototype.COMBOBOXZINDEX = 1000 //change this if you must
243
244function ComboBox_init()
245
258
260function ComboBoxItem(text,value)
261
266document.write('<link rel="STYLESHEET" type="text/css" href="ComboBox.css">')

Code
1 .combo-button {
2 cursor: hand;
3 cursor: pointer;
4 height: 20px;
5 border: 1px solid rgb(120,172,255);
6 padding: 0;
7 background: rgb(234,242,255);
8 width: 14px;
9 vertical-align: baseline;
10 font-size: 8pt;
11 font-family: Webdings, Marlett;
12 }
13 .combo-hilite {
14 cursor: hand;
15 cursor: pointer;
16 background: rgb(234,242,255);
17 border: 1px solid rgb(120,172,255);
18 color: black;
19 font-family: verdana;
20 font-size: 9pt;
21 }
22 .combo-item {
23 cursor: hand;
24 cursor: pointer;
25 background: white;
26 border: 1px solid white;
27 color: black;
28 font-family: verdana;
29 font-size: 9pt;
30 }
31
32 .combo-input {
33 border: 1px solid rgb(120,172,255) !important;
34 width: 138px !important;
35 vertical-align: baseline;
36 }
37
38 .combo-list table {
39 table-layout: fixed;
40 width: 149px;
41 }
42
43 .combo-list {
44 border: 1px solid black;
45 background: white;
46 padding: 1px;
47 width: 149px;
48
49 /* enable this if you want scroll bars
50 height: 200px;
51 overflow: auto;
52 overflow-x: visible;
53 overflow-y: auto;
54 scrollbar-base-color: rgb(234,242,255);
55 scrollbar-highlight-color: rgb(234,242,255);
56 scrollbar-3dlight-color: rgb(120,172,255);
57 scrollbar-darkshadow-color: rgb(120,172,255);
58 scrollbar-shadow-color: rgb(234,242,255);
59 scrollbar-face-color: rgb(234,242,255);
60 scrollbar-track-color: white;
61 scrollbar-arrow-color: black;
62 */
63 }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐