页面中无线联动下拉框

shuanghanyandan 2012-11-12 04:10:18
$("#industry_Type").change(function(){
var industry_Type = $("#industry_Type").val();
if("A" == industry_Type){
$("#trade").show();
$("#serverId").hide();
}else{
$("#trade").hide();
$("#serverId").show();
}
});
这是页面中的js调用
<tr>
<td class="td_title">
<span class="">行业查询类型:</span>
</td>
<td>
<select id="industry_Type" name="industry_Type">
<option value="A">行业门类</option>
<option value="B">现代服务业</option>
</select>
</td>
<td style="width: 340px;">
<select id="trade" name="trade">
<option value="">全部</option>
<c:forEach items="${tradelist}" var="item">
<option value="${item.industry_phy}">${item.identDesc}</option>
</c:forEach>
</select>
</td>

<td style="width: 340px;" >
<select id="serverId" name="serverId">
<option value="">全部</option>
<c:forEach items="${serverlist}" var="item">
<option value="${item.serverId}">${item.serverName}</option>
</c:forEach>
</select>
</td>
</tr>
如何做成不刷新的下拉框啊,这个在页面上显示也不好看,谁有现成的给个也好啊
...全文
64 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
hch126163 2012-11-13
  • 打赏
  • 举报
回复
数据量大用 ajax 数据量不大, 可以把数据放js 也可以一次全部加载
  • 打赏
  • 举报
回复
$.ajax();

87,904

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧