Home  >  Article  >  Web Front-end  >  Implementation code for operating HTML controls under jquery_jquery

Implementation code for operating HTML controls under jquery_jquery

WBOY
WBOYOriginal
2016-05-16 18:36:37918browse

Operation drop-down box [Select]

1. $("#seelctId").append("");//Add option to the drop-down box (ddlSayTo This is ID of the drop-down box)

 $("#seelctId").val(optionval);//Select the option just added

2. $("#seelctId option:selected"). text();//Get the text value of the currently selected option

 $("#seelctId").val();//Get the option value of the currently selected option

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