Jquery is used to implement the drop-down menu type _ jquery

Source: Internet
Author: User
In recent cases, you need to use a drop-down menu, but the problem is that there are various options in it: you can then ask the user to enter the Internet and find a bunch of ready-made controls, however, it takes a lot of time for me to get to know how to use my current system. This time should be similar to the cost of my own work.
Then I 'd better do it myself. I can better understand how it works, and it will be easier to use it later.
My goal is to use this as a control and reduce the coupling of external programs, that is, to minimize the necessary conditions for external programs to use, without forgetting to add any settings, the program will be suspended.
If you may or even want to, you only need to reference one Jquery and other javasrt files are generated by the program.
Finally, I want to use the dynamic controls I mentioned earlier. Today I will first study and use the following small html model to test the feasibility, confirm the error and change it to ASP at the start of construction.. NET.
This program has several important issues that need attention:
The trigger mode of the drop-down menu, how to draw the content of the drop-down menu, how to capture the trigger of the menu event, and where to capture the selected event Value
After the above problem is solved, ASP. NET is used to re-write the code. Therefore, when designing the child model, you must pay attention to whether it can be applied to ASP. NET.
The concept is as follows:
My plan is to design a button that is triggered by its OnClick event. Then JQuery will capture the menu array dynamically generated by ASP. NET to generate menus dynamically,
You must be able to set three events for mouseover mouseout click in the generated menu. The first two events are for the sake of appearance, so that the user can know that there is an action. After the click event is triggered,
Store the selected value in the server control TextBox of asp.net, so that the value can be sent back to the server for processing in PostBack.

The Code is as follows:




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.