Example tutorial of jQuery selecting drop-down list

零下一度
Release: 2017-06-29 10:07:29
Original
1029 people have browsed it

jQuery部分:

$("#form1 select").change(function () { var s=[]; $("#form1 select :selected").each(function () { var temp=$(this).html(); s.push(temp);//注意这里不能使方括号 }) var xx=s.join();//默认中间加逗号 $("div:last").html(xx); }) html部分: 
Copy after login
下拉列表1:


下拉列表2:


Copy after login

        
Copy after login

The above is the detailed content of Example tutorial of jQuery selecting drop-down list. For more information, please follow other related articles on the PHP Chinese website!

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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!