這是我的jQuery和JavaScript與我有一個下拉,從中我可以選擇文件..所以我需要的是,我必須從這個下拉列表中選擇多個文件,並放在新的div
下拉放置在其默認的地方,只是我所要做的就是選擇越來越多的文件,並追加到add_dd(格)與單擊添加更多的過濾器 這是我的jQuery的功能,所以請告訴我從下拉列表中選擇列表
$(".add_more_btn2").click(function() {
var abc = '<div class="slider_slect"><div class="fl"><dl id="sample_dc_1";><dt><a href="#"><span><img class="flag" src="images/select_arrow.gif" alt="" /></span></a></dt><dd><ul><li><a href="#"><img class="flag" src="images/select_img1.gif" alt="School" title="School"/></a></li><li><a href="#"><img class="flag" src="images/select_img2.gif" alt="Grade" title="Grade" /></a></li><li><a href="#"><img class="flag" src="images/select_img3.gif" alt="Gender" title="Gender" /></a></li><li><a href="#"><img class="flag" src="images/select_img4.gif" alt="Group" title="Group" /></a></li><li><a href="#"><img class="flag" src="images/select_img5.gif" alt="Race" title="Race" /></a></li><li><a href="#"><img class="flag" src="images/select_img6.gif" alt="Teacher" title="Teacher" /></a></li><li><a href="#"><img class="flag" src="images/select_img7.gif" alt="Parent" title="Parent" /></a></li><li><a href="#"><img class="flag" src="images/select_img8.gif" alt="Student" title="Student" /></a></li></ul></dd></dl></div><div class="fl"><dl id="sample2" class="dropdown2"><dt><a href="#"><span></span></a></dt><dd><ul><li><a href="#">Value Here</a></li><li><a href="#">Value Here</a></li><li><a href="#">Value Here</a></li><li><a href="#">Value Here</a></li><li><a href="#">Value Here</a></li><li><a href="#">Value Here</a></li><li><a href="#">Value Here</a></li><li><a href="#">Value Here</a></li></ul></dd></dl></div></div></br>';
var exist = $("#add_dd").html();
$("#add_dd").html(exist + abc);
$(".slider_slect").append($("#add_dd"));
});
這是我的下拉列表並在其中列出
<div class="slider_slect">
<div class="fl">
<dl id="sample_dc_1" class="dropdown"> <dt><a href="#"><span><img class="flag" src="images/select_arrow.gif" alt="" /></span></a></dt>
<dd>
<ul>
<li><a href="#"><img class="flag" src="images/select_img1.gif" alt="School" title="School"/></a>
</li>
<li><a href="#"><img class="flag" src="images/select_img2.gif" alt="Grade" title="Grade" /></a>
</li>
<li><a href="#"><img class="flag" src="images/select_img3.gif" alt="Gender" title="Gender" /></a>
</li>
<li><a href="#"><img class="flag" src="images/select_img4.gif" alt="Group" title="Group" /></a>
</li>
<li><a href="#"><img class="flag" src="images/select_img5.gif" alt="Race" title="Race" /></a>
</li>
<li><a href="#"><img class="flag" src="images/select_img6.gif" alt="Teacher" title="Teacher" /></a>
</li>
<li><a href="#"><img class="flag" src="images/select_img7.gif" alt="Parent" title="Parent" /></a>
</li>
<li><a href="#"><img class="flag" src="images/select_img8.gif" alt="Student" title="Student" /></a>
</li>
</ul>
</dd>
</dl>
</div>
<div class="fl">
<dl id="sample_dp_1" class="dropdown2"> <dt><a href="#"><span></span></a></dt>
<dd>
<ul>
<li><a href="#">Value Here</a>
</li>
<li><a href="#">Value Here</a>
</li>
<li><a href="#">Value Here</a>
</li>
<li><a href="#">Value Here</a>
</li>
<li><a href="#">Value Here</a>
</li>
<li><a href="#">Value Here</a>
</li>
<li><a href="#">Value Here</a>
</li>
<li><a href="#">Value Here</a>
</li>
</ul>
</dd>
</dl>
</div>
</div>
<div id="add_dd"></div>
<div class="add_more_btn2"> <a href="javascript:;" onClick="addAnswer(); return false;">Add More Filters<span>+</span></a>
</div>
爲什麼ü編輯這個問題 – anu
沒有任何一個有答案這個安東 – anu