Home > front end >  EasyUI grid control url, the official document to json, the json is what I wrote?
EasyUI grid control url, the official document to json, the json is what I wrote?

Time:11-27

The url should be how to write?
 
<body>


<script>
$(function () {
$(' # dg). The datagrid ({
Url: '{" total ": 2," rows ": [{" code" : "001", "name" : "jack"}, {" code ":" 002 ", "name" : "Alice"}]}',
The columns: [[
{field: 'code', the title: 'code', width: 100},
{field: 'name', the title: 'name', width: 100},
]]
});
})
</script>

CodePudding user response:

That doesn't call a url, call data
 

<body>


<script>
$(function () {
$(' # dg). The datagrid ({
Data: {" total ": 2," rows ": [{" code" : "001", "name" : "jack"}, {" code ":" 002 ", "name" : "Alice"}]},
The columns: [[
{field: 'code', the title: 'code', width: 100},
{field: 'name', the title: 'name', width: 100},
]]
});
})
</script>

  • Related