Skip to content
Advertisement

HTML form dropdown menu specify number range

I want to specify number range in drop-down menu list like 1-24 from example i am currently doing following

JavaScript

is there any way we can say use 1-24 and it dynamically create drop-down menu, I guess we need to use Javascript but i don’t know how to code them?

Advertisement

Answer

You don’t need Javascript, you can use a PHP for loop:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement