日期:2014-05-16 浏览次数:20454 次
<head> <script type="text/javascript" src="jquery-1.5.2.min.js"></script> <script> $(function() { $("#test").bind("click", function() { $("#sel").val(["Multiple2", "Multiple3"]); alert($("#sel").val()); }); }) </script> </head> <body> <select id="sel" multiple="multiple"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> </select> <button id="test">点击</button> </body>