ajax异步传值实现二级联动效果实例:
function initorg(id) {
$.ajax({
type:"post",
url:"${ctx}/html/machinemode/machinemode!selectSeriesByid.action?id="+ encodeURIComponent(encodeURIComponent(id))+"&a="+Math.random(),
async:false,
success:function(json){
alert(json); //接受的是表单
document.getElementById("pinpai").innerHTML=json;
}
})
}
系列和品牌做级联效果:
系列
品牌
Pc
Pc
平板
飞触
云客
系列:请选择
">
品牌:请选择
">
/**
* 给add.jsp下拉框提供数据
*
* @return
*/
public String toadd() {
SysConstantBean scb = (SysConstantBean) NativeBeanFactory
.getBean("constant&#