想做一个下拉列表,既可以从邦定的数据库里选数据,也可以手动的输入数据查询,该怎么做啊,我现在只会做单独的TextBox 输入和DropDownList选择,怎么能让他们结合起来啊,谢谢了!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body{margin:30px; font-size:12px}
td{ font-size:12px}
.inputText {
background-image: url(http://toumh.4888.net/UpSel.jpg);
background-repeat: no-repeat;
background-position: right center;
padding-right:18px;
background-attachment: fixed;
margin-right: 18px;
width:181px
}
.SelBg {
color: #FFFFFF;
background-color: #0A246A;
}
.table {
}
#Layer1 {
position:absolute;
width:200px;
height:100px;
z-index:2;
overflow: auto;
background-color: #FFFFFF;
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 2px;
border-left-width: 2px;
border-top-style: ridge;
border-right-style: inset;
border-bottom-style: inset;
border-left-style: ridge;
border-top-color: #D4D0C8;
border-right-color: #D4D0C8;
border-bottom-color: #D4D0C8;
border-left-color: #D4D0C8;
}
#Layer2 {
position:absolute;
width:181px;
height:14px;
z-index:2;
overflow: hidden;
}
-->
</style>
<script language="javascript">
<!--
function InputValue(values){
document.form1.input1.value=values;
Layer1.style.display="none";
}
function ShowLayer(){
if(Layer1.style.display==""){
Layer1.style.display="none";
}else{
Layer1.style.display="";
}
}
//-->
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="" style="margin:0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<input name="input1" type="text" class="inputText" onclick="ShowLayer()">
</td>
</tr>
<tr>
<td>
<div id="Layer1" style="display:none">
<table width="182" border="0" cellpadding="0" cellspacing="0" class="table">
<tr onmouseover="this.className='SelBg'" onmouseout="this.className=''">
<td height="14" onclick="InputValue('地区一')"><div id="Layer2" title="地区一">地区一</div></td>
</tr>
<tr onmouseover="this.className='SelBg'" onmouseout="this.className=''">
<td height="14" onclick="InputValue('地区二')"><div id="Layer2" title="地区二">地区二</div></td>
</tr>
<tr onmouseover="this.className='SelBg'" onmouseout="this.className=''">
<td height="14" onclick="InputValue('地区三')"><div id="Layer2" title="地区三">地区三</div></td>
</tr>
<tr onmouseover="this.className='SelBg'" onmouseout="this.className=''">
<td height="14" onclick="InputValue('地区四')"><div id="Layer2" title="地区四">地区四</div></td>
</tr>
<tr onmouseover="this.className='SelBg'" onmouseout="this.className=''">
<td height="14" onclick="InputValue('地区五')"><div id="Layer2" title="地区五">地区五</div></td>
</tr>
<tr onmouseover="this.className='SelBg'" onmouseout="this.className=''">
<td height="14" onclick="InputValue('地区六')"><div id="Layer2" title="地区六">地区六</div></td>
</tr>
<tr onmouseover="this.className='SelBg'" onmouseout="this.className=''">
<td height="14" onclick="InputValue('地区七')"><div id="Layer2" title="地区七">地区七</div></td>
</tr>
<tr onmouseover="this.className='SelBg'" onmouseout="this.className=''">
<td height="14" onclick="InputValue('地区八')"><div id="Layer2" title="地区八">地区八</div></td>
</tr>
<tr onmouseover="this.className='SelBg'" onmouseout="this.className=''">
<td height="14" onclick="InputValue('地区九')"><div id="Layer2" title="地区九">地区九</div></td>
</tr>
<tr onmouseover="this.className='SelBg'" onmouseout="this.className=''">
<td height="14" onclick="InputValue('地区十')"><div id="Layer2" title="地区十">地区十</div></td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</form>
</body>
</html>