#If you want to realize the value in multiple, it will change with the changes of province, city and district.
I tried many ways to assign values ??to multiple using js, but the value of multiple did not change.
Who knows how to solve it?
Multiple selections can be made in the multiple check box:
Picture description
Assignment code:
<select id="PositionList" multiple="multiple">
<c:forEach items="${sessionScope.positionl}" var="positionl">
<option value="${positionl.name}">${positionl.name}</option>
</c:forEach>
</select>
<script type="text/javascript">
$(document).ready(function() {
$('#PositionList').multiselect();
});
</script>
If js assigns a value to a general select:
success : function(data) {
var jsonpos = data;
var pos = "";
for (var int = 0; int < jsonpos.length; int++) {
pos += "<option value="+jsonpos[int].name+">"
+ jsonpos[int].name + "</option>";
}
}
這個(gè)就行了。但是 multiple 不能這樣賦值,還請(qǐng)大神指教?
歡迎選擇我的課程,讓我們一起見證您的進(jìn)步~~
document.getElementById('xxx').setAttribute('size',num) or $('xxx').attr('size',num)