How to obtain easyui plug-in attributes and easyui plug-in attributes
The easyui plug-in uses data-options to set properties much more, but reads less, but occasionally requires it. In fact, it is not difficult to use data-options to set relevant properties, in fact, the optoions method can be used to read data.
Var options = $ ('# object id'). Object Class ('options ');
To obtain the json object of the attribute list. stringify (options) can print the content of a json object. The following example shows a code example for obtaining the current page number and number of lines of a paging object from a datagrid object:
$ (Function () {$ ('# btn_search '). click (function () {var pager = $ ('# dg '). datagrid ('getpager'); // obtain the Page Object of the datagrid object var pageroptions =$ (pager ). pagination ('options'); // gets the attribute list of the paging object $. ajax ({url: "<? Php echo ADMIN_SITE_URL;?> /Index. php? Act = distribution & op = getcommision_tocash ", type: 'post', ype: 'json', data: {search: $ ('# f_search '). val (), onlyunprocess :( $ ('# unprocess '). attr ('checked') = 'checked '? 1:0), page: pageroptions. pageNumber, // get the page number attribute rows: pageroptions. pageSize // get the page size attribute of the paging object}, success: function (res) {if (! Res) {$. messager. alert ('data retrieval failed'); return false ;}$ ('# dg '). datagrid ('loaddata', res); // display query results}) ;}); $ ('# btn_search '). trigger ('click'); // automatically execute the query });