Home > Article > Web Front-end > jquery gets the value and text value of ASP.NET server-side controls dropdownlist and radiobuttonlist after generating client HTML tag_jquery
—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()