[英]How to multiple select item in ListBox without press CTRL in Asp.Net?
[英]How to select multiple items from a listbox asp.net without pressing the CTRL key using javascript?
如何使用JavaScript在不按CTRL鍵的情況下從列表框中選擇多個項目?
<asp:ListBox ID="Satellites" runat="server" AppendDataBoundItem="true" AutoPostBack="true" onchange='GetValueSatellite();' Width="400px" SelectionMode="Multiple"></asp:ListBox>
$('option').mousedown(function (e) {
e.preventDefault();
$(this).prop('selected', $(this).prop('selected') ? false : true);
return false;
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.