Input and select box | Sololearn: Learn to code for FREE!


Input and select box

I want to have a dependent numeric input. This numeric input depends on a select box that creates a specific numeric range for the input by selecting each option. For example: if we select option2, the numeric input will be min = 20 and max = 50!, if we select option3, the numeric input will be min = 10 and max = 30!. How can such a feature be created? Here's what I've tried: <form> <select id="selbox"> <option value="option1">option1</option> <option value="option2">option2</option> <option value="option3">option3</option> </select> <input type="number" id="num"> <button>click</button> </form>

4/18/2021 4:49:21 PM


1 Answer

New Answer


You can use js for it😀