ASP.NET给select联动赋值
下载的一个封装好的JS省市区联动,怎样把数据库的信息赋值给下拉
<select name="province3" id="province3" class="province3"></select><select name="city3" id="city3" class="city3"></select><select name="area3" id="area3"></select>asp.net js
<script language="javascript" type="text/javascript">
new PCAS("province3", "city3", "area3");
</script>
.aspx.cs中
public string province,city,area;
赋值:
province = "北京市";
city = "市辖区";
area = "朝阳区";
.aspx页面
<select name="province3" id="province3" class="province3"></select><select name="city3" id="city3" class="city3"></select><select name="area3" id="area3"></select>
<script language="javascript" type="text/javascript">
new PCAS("province3", "city3", "area3",<%=province%>,<%=city%>,<%=area%>);
</script>