[JS] Program Infrastructure for Easyui components

Source: Internet
Author: User

Program Infrastructure for Easyui components


The writing structure of Easyui component code has good extensibility and can be used as a reference model for JavaScript component development. The code structure is roughly as follows:

Easyui Basic Function Properties list
No function properties Description
1 $.fn.< Component Name > (options, param) The main entrance, user component initialization, method invocation, parameter modification, common methods of component invocation are options, GetValue, SetValue, etc.
Example:
Initializes or modifies a parameter example: $ ("#buttonid"). LinkButton ({iconcls: ' Icon-save ', plain:true});
GetValue Example:
$ (' #ss '). SearchBox (' GetValue ');
SetValue Example:
$ (' #ss '). SearchBox (' SetValue ', ' Wang Seal ');
2 $.fn.< Component name >.parseoptions (target) Parameter resolution (typically inherits the parent component parameter parser), is used to parse the attributes written on the tag, and is set to the options in the component.
3 $.fn.< Component Name >.defaults Component default properties (typically inherit the default properties of the parent component)
4 $.fn.< Component Name >.methods Method Collection



Related Article

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.