Adding options to select with javascript

后端 未结 9 1166
执念已碎
执念已碎 2020-11-22 15:40

I want this javascript to create options from 12 to 100 in a select with id=\"mainSelect\", because I do not want to create all of the option tags manually. Can you give me

9条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 16:05

    See: What is the best way to add options to a select from an array with jQuery?

    $('#mySelect')
          .append($('

提交回复
热议问题