开发者

JQuery and triple droplist

开发者 https://www.devze.com 2023-04-04 12:59 出处:网络
I\'m new to jQuery. I\'ve made a triple droplist but still need 2 things which I cant get to work. I want it to start with select category and the other two blank.

I'm new to jQuery. I've made a triple droplist but still need 2 things which I cant get to work.

  1. I want it to start with select category and the other two blank.
  2. I want the text under drop lists to show the text from the first droplist (category). The problem is that when I change something in drop list the text under, doubles...

Any suggestions?

Link: htt开发者_如何学Cp://photoproduct.pl/test2.html


try this one:

$("select.category").change(function () {
 var str = "";
 $("select.category option:selected").each(function () {
 str += $(this).text();
 });
 $("#log").text(str);
 })
 .change(); 
0

精彩评论

暂无评论...
验证码 换一张
取 消