jquery如何改变多选框的值?
例 1.13(selectChangeMultiple.html)
<html>
<head>
<script language="javascript" src="jquery.min.js"></script>
<script language="javascript">
function dis(){undefined
var mulValues = $("#num").val();
// alert(multipleValues);
/*html的参数必须是个String类型*/
$("p").html(""+mulValues);
}
$(function(){undefined
$("select").change(dis);
});
</script>
</head>
<body>
<p></p>
<select id="num" multiple="multiple" style="height:40px;">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</body>
</html>
更多内容请见原文,文章转载自:https://blog.csdn.net/qq_44594371/article/details/103063332