How to obtain easyui plug-in attributes and easyui plug-in attributes

Source: Internet
Author: User

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 });




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.