Suppose I have 3 options in the drop-down list: red, blue, others. If the user selects the option as others, then under the text box should be visible how to use your favorite color. I can fill the drop-down list with flowers, but I donβt know how to bring the text box for selecting others to the drop-down list. I know that using javascript can be done, but I'm completely new to javascript. anyone please help me out ??
This is the selection option that I implement in my html form
<select name="color"> // color <option>pick a color</option> <option value="red">RED</option> <option value="blue">BLUE</option> <option value="others">others</option> </select> <input type="text" name="color" id="color" /></td> // this textbox should be hidden //until unless others is selected in the drop down box
source share