2021.7.28的博客
二级联动
function Loadselone() {
$.get('http://localhost:9798/api/Values/GetCity/0', res => {
$(res).each(function () {
$("#Cityone").append('<option value="' + this.cId + '">' + this.cName + '</option>');
})
})
}
function Loadseltoo() {
var id = $("#Cityone").val();
$("#Citytoo").empty();
$.get('http://localhost:9798/api/Values/GetCity/' + id, res => {
$(res).each(function () {
$("#Citytoo").append('<option value="' + this.cId + '">' + this.cName + '</option>');
})
})
}
Ajax
创建一个表字段要创建一个类型字段进行区分。

浙公网安备 33010602011771号