亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - How to assign value to multiple in js into the form of multi-select box below?
天蓬老師
天蓬老師 2017-05-19 10:36:21
0
1
836


#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)步~~

reply all(1)
小葫蘆
    document.getElementById('xxx').setAttribute('size',num) or $('xxx').attr('size',num)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template