Select控件属性介绍:
ID属性:获取或设置分配给Select控件的编程标识符。
Name属性:获取或设置与Select控件关联的唯一标识符。
Multiple属性:指定是否在Select控件中同时显示多少个项。
举个例子:页面有一个table控件、2个TextBox控件、2个Button控件、2个Select控件。
1
<
form id
=
"
form1
"
runat
=
"
server
"
>
2
<
select name
=
"
Select1
"
style
=
"
width: 69px
"
onchange
=
"
ChangeItem()
"
>
3
<
option value
=
"
吉林省
"
>
吉林省
</
option
>
4
<
option value
=
"
山西省
"
>
山西省
</
option
>
5
<
option value
=
"
河北省
"
>
河北省
</
option
>
6
<
option value
=
"
河南省
"
>
河南省
</
option
>
7
<
option value
=
"
辽宁省
"
>
辽宁省
</
option
>
8
<
option value
=
"
黑龙江省
"
>
黑龙江省
</
option
>
9
<
option value
=
"
北京市
"
>
北京市
</
option
>
10
<
option value
=
"
天津市
"
>
天津市
</
option
>
11
<
option value
=
"
上海市
"
>
上海市
</
option
>
12
<
option value
=
"
陕西省
"
>
陕西省
</
option
>
13
<
option value
=
"
江苏省
"
>
江苏省
</
option
>
14
<
option value
=
"
江西省
"
>
江西省
</
option
>
15
<
option value
=
"
四川省
"
>
四川省
</
option
>
16
<
option value
=
"
安徽省
"
>
安徽省
</
option
>
17
<
option value
=
"
浙江省
"
>
浙江省
</
option
>
18
<
option value
=
"
湖北省
"
>
湖北省
</
option
>
19
</
select
>
20![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
21
<
select name
=
"
Select2
"
style
=
"
width: 67px
"
>
22
<
option value
=
"
长春市
"
>
长春市
</
option
>
23
<
option value
=
"
太原市
"
>
太原市
</
option
>
24
<
option value
=
"
石家庄市
"
>
石家庄市
</
option
>
25
<
option value
=
"
郑州市
"
>
郑州市
</
option
>
26
<
option value
=
"
沈阳市
"
>
沈阳市
</
option
>
27
<
option value
=
"
哈尔滨市
"
>
哈尔滨市
</
option
>
28
<
option value
=
"
北京市
"
>
北京市
</
option
>
29
<
option value
=
"
天津市
"
>
天津市
</
option
>
30
<
option value
=
"
上海市
"
>
上海市
</
option
>
31
<
option value
=
"
西安市
"
>
西安市
</
option
>
32
<
option value
=
"
南京市
"
>
南京市
</
option
>
33
<
option value
=
"
南昌市
"
>
南昌市
</
option
>
34
<
option value
=
"
成都市
"
>
成都市
</
option
>
35
<
option value
=
"
合肥市
"
>
合肥市
</
option
>
36
<
option value
=
"
杭州市
"
>
杭州市
</
option
>
37
<
option value
=
"
武汉市
"
>
武汉市
</
option
>
38
</
select
>
39
</
form
>
40
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
2
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
3
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
4
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
5
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
6
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
7
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
8
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
9
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
10
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
11
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
12
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
13
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
14
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
15
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
16
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
17
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
18
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
19
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
20
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
21
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
22
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
23
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
24
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
25
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
26
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
27
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
28
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
29
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
30
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
31
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
32
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
33
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
34
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
35
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
36
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
37
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
38
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
39
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
40
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMDV2Ym1VdVoybG0%3D.jpg?w=700&webp=1)
联动代码如下:
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMME52Ym5SeVlXTjBaV1JDYkc5amF5NW5hV1k9.jpg?w=700&webp=1)
![Select控件实现联动下拉列表框效果 Select控件实现联动下拉列表框效果](https://image.shishitao.com:8440/aHR0cHM6Ly93d3cuaXRkYWFuLmNvbS9nby9MMGx0WVdkbGN5OVBkWFJzYVc1cGJtZEpibVJwWTJGMGIzSnpMMFY0Y0dGdVpHVmtRbXh2WTJ0VGRHRnlkQzVuYVdZPQ%3D%3D.jpg?w=700&webp=1)