Is it possible to use a for loop in <select> in html? and how?

后端 未结 6 1550
不知归路
不知归路 2021-01-05 20:38

I am trying to use a for loop in html but i dont even know if this is possible. Is it? and if yes how? I dont want to use php. only html and javascript.

this is my

6条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-05 21:00

    HTML is not a programming language, just a markup language, so it doesn't include things like for loops or if statements. Javascript does though. You could use javascript to generate/manipulate the HTML, and thus use for loops to create your

    You can also try this out on http://jsfiddle.net/6HUHG/3/

提交回复
热议问题