Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

104
Views
Asigne el valor de la entrada de número al valor del botón de radio

Tengo un botón de radio que cuando se selecciona revela un giro táctil, cada vez que se hace clic en el botón de aumento o disminución del giro táctil, quiero que el valor del botón de radio se establezca en el valor de la entrada del número de giro táctil. Intenté poner ('input.custom-vote:radio').val(value) en la parte inferior de la función de aumento de valor y disminución de valor, pero aún no funciona. Agradeceré mucho cualquier ayuda para solucionar este problema.

 <!--Touch-spin increase Value--> function increaseValue() { var value = parseInt(document.getElementById('number').value, 10); value = isNaN(value) ? 0 : value; value++; document.getElementById('number').value = value; } <!--Touch-spin decrease Value--> function decreaseValue() { var value = parseInt(document.getElementById('number').value, 10); value = isNaN(value) ? 0 : value; value < 1 ? value = 1 : ''; value--; document.getElementById('number').value = value; }
 <div class="custom-control custom-radio mb-3"> <input name="votes" value="0" class="form-check-input custom-control-input custom-vote" id="custom" type="radio"> <label class="custom-control-label form-check-label" for="custom">Custom Vote</label> </div> <div class="input-group custom-vote"> <button id="decrease" onclick="decreaseValue()" value="Decrease Value" type="button"></button> <input type="number" maxlength="6" size="5" class="touchspin form-control custom-count" id="number" value="150"> <button id="increase" onclick="increaseValue()" value="Increase Value" type="button"></button> </div>

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Esto podría funcionar:

 document.getElementById("custom").value = document.getElementById('number').value
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!