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

95
Views
Actualice el estado de las casillas de verificación en html a través de js

Quiero que se actualice una casilla de verificación cuando cambie un valor. En este breve ejemplo, si la segunda casilla de verificación está marcada, la primera también debe actualizarse y marcarse. La funcionalidad de la primera casilla de verificación aún debe permanecer intacta. ¿Cómo puedo conseguir esto?

 function onoff() { currentvalue = document.getElementById('onoff').value; if (currentvalue == "Off") { document.getElementById("onoff").value = "On"; console.debug("OFF"); } else { document.getElementById("onoff").value = "Off"; console.debug("ON"); } } function xy() { document.getElementById('onoff').value = "On"; console.debug("xy"); }
 <input type="checkbox" value="On" id="onoff" onclick="onoff();"> <input type="checkbox" value="Off" id="xy" onclick="xy();">

about 4 years ago · Juan Pablo Isaza
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!