使用bootsrap的Asp.Net multiselect下拉列表 [英] Asp.Net multiselect dropdownlist using bootsrap
本文介绍了使用bootsrap的Asp.Net multiselect下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用下拉列表作为使用这个网站但代码behinh我无法获得多选的值。我想可能是我可以通过写一些javascript的隐藏值。不,它不起作用。我的问题在哪里。
Hi,
I use dropdownlist as use this website but code behinh I can not get multi selected values. and I thought may be I can get via hidden values on write some javascript. bu it does not work. where is the my problem.
<script type="text/javascript">
$(".dropdown-menu ul li a").click(function () {
var selText = $(this).text();
alert(selText);
});</script>
推荐答案
( .downdown-menu ul li a)。click( function (){
var selText =
(".dropdown-menu ul li a").click(function () { var selText =
( this )。text();
alert(selText) ;
});< / script>
(this).text(); alert(selText); });</script>
检查下面的示例代码,
check below sample code,
<head runat="server">
<title></title>
<script src="Scripts/jquery-1.8.0.min.js"></script>
<script src="Scripts/bootstrap-select.min.js"></script>
<link href="Content/bootstrap-select.min.css" rel="stylesheet" />
<script>
这篇关于使用bootsrap的Asp.Net multiselect下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文