Onchange,onselect,onclick Events in Easyui Combobox

Source: Internet
Author: User

onchange,onselect,onclick,3 event is triggered when the Combobox option changes in Easyui. Recently to do a Cascade Combo menu, similar to the choice of address when users fill in the province, city, District menu, select the Province, the city menu to change the area menu empty, select the city after the menu will be changed accordingly. In order to achieve this function in the Combobox selection event entangled for a while, now summed up their differences. OnChange (newval, Oldval)

The official document says that when the Combobox selection is changed, the parameter is the new value selected and the old value before it. This event is also triggered when the option is changed by the program, not when the same item is selected, and not when the new data option becomes empty when the Combobox load is completed. onselect (item)

The official document says that when the user chooses the Combobox option, this event is not triggered when the program changes the Combobox option, but the actual test shows that the trigger for the event is exactly the same as OnChange, except that its parameters are Combobox selected data items  OnChange is the new value and the old value selected. OnClick (item)

The official document says that when a user clicks on a Combobox option, it triggers. The event is tested to trigger when the user clicks on the option, and the user clicks the same option repeatedly. Change the options with the program and do not trigger when the new data option becomes empty when the Combobox load is completed.

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.