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部分:
下拉列表1:
下拉列表2:
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!