开发者

JQuery and triple droplist

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜