js代码:

var form = layui.form, layer = layui.layer;
form.on("select(上级)", function(data){
	var url = Const.apiUrl + "获取下级下拉框集合的Url";
	View.get(url, "khlx=" + data.value, function(resp) {
		$("select[name='下级']").html("");
		var html = "<option value>--属性名称--</option>";
		for (var i = 0; i < resp.length; i++) {
			html += "<option value = '" + resp[i].key +"'>" + resp[i].value +"</option>";
		}
		$("select[name='下级']").append(html);
		// 刷新select选择框渲染
		form.render();
	}, function() {
		TmplUtils.showMsgFail(Locale.get("custRiskRateConfig.info.propFail"));
	});
});

   参考:https://jingyan.baidu.com/article/afd8f4deafd30634e386e950.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
  • 2021-08-18
  • 2021-08-20
  • 2021-07-05
猜你喜欢
  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
相关资源
相似解决方案