Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dymamic generate text input field

 
Kan Qiu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can I use Javascript to generate text input field base on user selection.
<select name="box">
<option value="1"> add 1 box </option>
<option value="2"> add 2 box </option>
</select>
if add 1 box is selected, I would like to have one more box generated after this dropdown list. if add 2 box is selected, I would have 2 box generated instead of just 1.
please help.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is a rather easy code:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic