dwr 联动例子:

dwr  联动例子:
//联动
function addActypeSelect(father, relatedName) {
 DWRUtil.removeAllOptions(relatedName);
 var callback = function(map) {
  DWRUtil.addOptions(relatedName,[{name:"-请选择-",value:""}],"value","name");
  DWRUtil.addOptions(relatedName, map);
 };
 RequestUtil.getPlaneNumByPlaneType(father.value, callback);
}
//修改时选定其值
function restoreActypeTailNo(father, relatedName, defaultValue) {
 DWRUtil.removeAllOptions(relatedName);
 var callback = function(map) {
  DWRUtil.addOptions(relatedName,[{name:"-请选择-",value:""}],"value","name");
  DWRUtil.addOptions(relatedName, map);
  DWRUtil.setValue(relatedName, defaultValue);
 };
 RequestUtil.getPlaneNumByPlaneType(father.value, callback);
}

你可能感兴趣的:(dwr 联动例子:)