The combo of Easyui

Source: Internet
Author: User

The combo component is a custom drop-down list component that has no class loading mode, mainly through jquery. It relies on validatebox and can use many of its properties. For example:

Front desk:

<div id= "box" ></div>

<id id= "Food" >

<div style= "width:150px;padding:50px" > Please select </div>

<div style= "padding:50px" ><input type= "Radio" value= "GZ1" ><span> fruit 1</span></div>

<div style= "padding:50px" ><input type= "Radio" value= "gz2" ><span> fruit 2</span></div>

<div style= "padding:50px" ><input type= "Radio" value= "gz3" ><span> fruit 3</span></div>

</div>

Background (JQ):

$ (function ()

$ ("box"). Combo ()/* Here, you will be able to display an empty drop-down list box */

{require:true,/* cannot be empty */

?? How do I put it in?

In the menu component, you can associate a menu item by using the Properties menu: ' #box ', where it must be used in a different way. Open the Firebug way to observe:

Console:log ($ ("#box"). Combo ("Panel")); /* primarily associated with panel properties */

$ ("#food"). AppendTo ($ ("#box"). Combo ("Panel")); /* To complete the display, this is the key */

};

The first step:?? How do I get the value of a clicked drop-down list?

$ ("#foond input"). Click (Funciotn () {

var v=$ (this). Val ();/* Value selected */

var t=$ (this). Next ("span"). text (); /* Gets the peer span object of the clicked input, which is also the key */

});

The second step: Assign values:

$ ("#box"). Combo ("SetValue", V); /* The selected Value */

$ ("#box"). Combo ("SetText", t);/* Selected text */

$ ("box"). Combo ("Hidepanel");/* Hide pop-up panel */

$ ("#box"). Combo ("SetValue", V). Combo ("SetText", T). Combo ("Hidepanel");/* This is the tutorial's notation */

})

The combo of Easyui

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.