Home  >  Article  >  Web Front-end  >  Code to get select selected value in jquery_jquery

Code to get select selected value in jquery_jquery

WBOY
WBOYOriginal
2016-05-16 18:05:31880browse

jquery gets the selected text and value
Gets the selected text: $("#ddlregtype").find("option:selected").text();
Gets the selected value: $(" #ddlregtype ").val();
Get the selected index: $("#ddlregtype ").get(0).selectedindex;

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