我如何在jquery datatable中定义具有多个选择的dropdown,我正在使用以下代码,请告诉我:
aoColumns: [ null,
null,
null,null,
{ type: "date-range" },
{ type: "select",values:['1', '2', '3','4','5']},
{ type: "date-range" },
{ type: "text" },
null,
null,
]});发布于 2013-09-27 21:38:06
使用jQuery选择的插件:http://davidwalsh.name/jquery-chosen
并将此代码放入:
var selectMulti = "<select class='chosen' multiple='true' style='width:200px;'>"
+ "<option>1</option>"
+ "<option>2</option>"
+ "<option>3</option>"
+ "<option>4</option>"
+ "<option>5</option>"
+ "</select>";
//inside the constructor of datatable, put this:
aoColumns: [ null,
null,
null,null,
{ "type": "date-range" },
{ "sTitle" : selectMulti},
{ "type": "date-range" },
{ "type": "text" },
null,
null,
]});
//after build the datatable, run this code
$(".chosen").chosen();https://stackoverflow.com/questions/19051606
复制相似问题