Easy way to add drop down menu with 1 - 100 without doing 100 different options?

前端 未结 7 1527

I was just wondering if there was a simple shortcut to add options to a dropdown menu for the numbers 1 to 100 instead of having to do the following:

7条回答
  •  盖世英雄少女心
    2021-02-01 05:33

    Not with pure HTML as far as I know.

    But with JS or PHP or another scripting language such as JSP, you can do it very easily with a for loop.

    Example in PHP:

    
    

提交回复
热议问题