草莓酱 2013-05-24
代码如下:
<select id ="sela" title="Basic example" multiple="multiple" name="example-basic" size="5"> <option value="V1">Option 1</option> <option value="V2">Option 2</option> <option value="V3">Option 3</option> <option value="option4">Option 4</option> <option value="option5">Option 5</option> <option value="option6">Option 6</option> <option value="option7">Option 7</option> <option value="option8">Option 8</option> <option value="option9">Option 9</option> <option value="option10">Option 10</option> <option value="option11">Option 11</option> <option value="option12">Option 12</option> </select>
代码如下:
$(function(){ $("select").multiselect({ noneSelectedText: "==请选择==", checkAllText: "全选", uncheckAllText: '全不选', selectedList:4 }); });
代码如下:
MyValues:function(){ return multiValues; }
代码如下:
function showValues() { var valuestr = $("#sela").multiselect("MyValues"); alert(valuestr); }