EasyUI datagrid 改变url属性 实现动态加载数据

$(function () {
        //说明:btnsearch按钮,selCat下拉列表,ttdatagrid  table
$("#btnsearch").click(function () { //1.1 获得 选中的分类ID var $selCat = $("#selCat"); var MID = $selCat.children("option:selected").val(); //1.2 查询数据 并刷新GD显示 var op = $("#tt").datagrid("options");//获取 option设置对象 op.url = "/admin/admin/WebSecondCatJsonByID/" + MID;//设置url $("#tt").datagrid("load");//重新加载 }) })
原文地址:https://www.cnblogs.com/iack/p/3527178.html