Home > Web Front-end > JS Tutorial > body text

Use Jquery to implement a drop-down menu that can input values ​​​​prototype_jquery

WBOY
Release: 2016-05-16 17:58:40
Original
943 people have browsed it

After searching online, there are a bunch of ready-made controls, but I need to understand the ready-made controls and apply them in combination with my current system. It will take a lot of time. The cost of this time should be about the same as making one myself
Then I might as well If you make one yourself, you 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 say, the necessary conditions for the use of external programs should be reduced as much as possible, so as not to forget to add any settings. The program hangs.
If possible or even desirable, only one Jquery needs to be referenced and the other JavaSciprts are generated programmatically.
Finally, I hope it can be used in combination with the dynamic controls mentioned before. Today I will study it first and use the following html prototype to test the feasibility first. After confirming that it is correct, I will start to change it to ASP. NET controls.
This program has several important issues that need attention:
How the drop-down menu is triggered, how to draw the content of the drop-down menu, the capture triggered by the menu event, and where the value should be stored after capturing the selection event
After the above problems are solved, they will be rewritten in ASP.NET later, so when designing the prototype, you need to pay attention to whether it can be applied to ASP.NET
The idea is as follows:
This is mine The plan is to design a button to be triggered by its OnClick event. At that time, JQuery will capture the menu array dynamically generated by ASP.NET to dynamically generate the menu.
The generated menu must be able to set three events: mouseover mouseout click, the first two are for aesthetics, so that the user knows that there is an action. After the click event is triggered,
stores the selected value in the asp.net server control TextBox, so that the value can be passed back in PostBack The server side handles it.

Copy code The code is as follows:




Use Jquery to implement a drop-down menu that can input values ​​(1)






< ;br />
< button id="btnDDL" inputid="txtKey" >▼






There are also problems that everyone wants to solve, which is to make divPop dynamically generated...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!