How would I dynamically create input boxes on the fly?

后端 未结 4 843
走了就别回头了
走了就别回头了 2021-01-23 19:55

I want to use the value of a HTML dropdown box and create that number of input boxes underneath. I\'m hoping I can achieve this on the fly. Also if the value changes it should a

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-23 20:42

    you would most likely use javascript(which is what jquery is), here is an example to show you how it can be done to get you on your way

     
     

    javascript to dynamically create a selected number of inputs on the fly, based on Mutahhir answer

    
    

提交回复
热议问题