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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 17:56:421216browse

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"));
Statement:
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