Good afternoon, how on jquery to make it so that when you enter a number into <input type="text"> with your hands, the program would select the necessary answers in the checkbox (according to the entered number)?
Here is the code:
<form> <input type="checkbox" class="chk" id="ch1" value="1">Кошка</br> <input type="checkbox" class="chk" id="ch2" value="2">Собака</br> <input type="checkbox" class="chk" id="ch3" value="4">Попугай</br> <input type="checkbox" class="chk" id="ch4" value="8">Рыбки</br> <input type="checkbox" class="chk" id="ch5" value="16">Рептилии</br> <input type="checkbox" class="chk3" id="ch6" name="ch6" value="0">ЖИВОТНЫЕ ОТСУТСТВУЮТ</br> <input type="text" id="result" value="19"></br> </form>