循环添加option

    技术2022-07-03  109

     <select id="selectUserNum" style="width: 60px; float: left;">

      <script type="text/javascript">                            var selectID = document.getElementById("selectUserNum");                            for (var i = 1; i <= 99; i++) {                                selectID.options[i-1] = new Option(i, i);                            }                        </script>                    </select>

     


    最新回复(0)