求高手解答asp中的问题,如何使这个联动?
后台publicstringabc(){ddl2.Disabled=false;ddl2.DataSource=CompttManage.selectCompttbyar...
后台
public string abc()
{
ddl2.Disabled = false;
ddl2.DataSource = CompttManage.selectCompttbyareaid(int.Parse(ddl1.Value));
ddl2.DataTextField = "Name";
ddl2.DataValueField = "Id";
ddl2.DataBind();
return ddl2.DataTextField;
}
前台
<form id="form1" runat="server">
<div>
<select id="ddl1" name="s1" runat="server" onchange="aa()" >
<option value="0">全国</option>
<option value="1">省级</option>
<option value="2">市级</option>
<option value="3">校级</option>
</select>
<script type="text/javascript">
function aa() {
document.getElementById("ddl2").innerHTML = "<%=abc() %>";
}
</script>
<div id="aa"><select id="ddl2" runat="server" disabled="disabled">
<option >请选择</option>
</select> 展开
public string abc()
{
ddl2.Disabled = false;
ddl2.DataSource = CompttManage.selectCompttbyareaid(int.Parse(ddl1.Value));
ddl2.DataTextField = "Name";
ddl2.DataValueField = "Id";
ddl2.DataBind();
return ddl2.DataTextField;
}
前台
<form id="form1" runat="server">
<div>
<select id="ddl1" name="s1" runat="server" onchange="aa()" >
<option value="0">全国</option>
<option value="1">省级</option>
<option value="2">市级</option>
<option value="3">校级</option>
</select>
<script type="text/javascript">
function aa() {
document.getElementById("ddl2").innerHTML = "<%=abc() %>";
}
</script>
<div id="aa"><select id="ddl2" runat="server" disabled="disabled">
<option >请选择</option>
</select> 展开
网易云信
2023-12-06 广告
2023-12-06 广告
UIkit是一套轻量级、模块化且易于使用的开源UI组件库,由YOOtheme团队开发。它提供了丰富的界面元素,包括按钮、表单、表格、对话框、滑块、下拉菜单、选项卡等等,适用于各种类型的网站和应用程序。UIkit还支持响应式设计,可以根据不同...
点击进入详情页
本回答由网易云信提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询