dwr 实现级联下拉

function displaygrop(){
selectimpl.getgroup(callback1);
}
function callback1(data){
DWRUtil.addOptions("grops",data,'gid','gname');
}

function changeuers(uids){
selectimpl.getusers(uids,callback2);
}
function callback2(data){
DWRUtil.removeAllOptions("users");
DWRUtil.addOptions("users",data,'uid','username');
}
<body onload="displaygrop();">
<select id="grops" onchange="changeuers(this.value);"></select>
<select id="users"></select>

你可能感兴趣的:(DWR)