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

jquery gets the value and text value of ASP.NET server-side controls dropdownlist and radiobuttonlist after generating client HTML tag_jquery

WBOY
Release: 2016-05-16 18:24:20
Original
1202 people have browsed it

—Get the text of the dropdownlist (ddlList is the ID of the server-side dropdownlist, and generates a select tag with a name attribute equal to ddlList)

 $("#ddlList option:selected").text()

2. Get the value of the dropdownlist (ddlList is the ID of the server-side dropdownlist, and generate a select tag with a name attribute equal to ddlList)

 $("#ddlList").val()

3. Get The text of the radiobuttonlist (rbtList is the ID of the server-side radiobuttonlist, generating a set of input labels whose name attribute is equal to rbtList)

 $("input[name='rbtList']:checked label").text()

4. Get the value of radiobuttonlist (rbtList is the ID of the server-side radiobuttonlist, and generate a set of input tags with a name attribute equal to rbtList)

 $("input[name='rbtList']:checked ").val()

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