Home > Web Front-end > JS Tutorial > ASP.NET jQuery Example 8 (Dynamicly Add Content to DropDownList)_jquery

ASP.NET jQuery Example 8 (Dynamicly Add Content to DropDownList)_jquery

WBOY
Release: 2016-05-16 17:56:42
Original
1198 people have browsed it

First prepare the page code:

Copy the code The code is as follows:





Select color




























< asp:DropDownList ID="ddlSecond" runat="server">







Add content dynamically mainly through jQuery’s append method. The script code is as follows:
Copy code The code is as follows:


Recipe8





The final display effect is as follows:


Dynamic content can also be added in the following ways:
$("#ddlSecond").append($(""). val("31").html("Blue 1"));
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