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

259
Views
el color de fondo de navegación de preguntas no cambia

Soy principiante y trato de hacer una prueba dinámica usando ajax , quiero cambiar el color de la navegación del número de pregunta cuando el botón de opción está marcado y cuando hago clic en el botón Siguiente, el color de fondo debe ser verde.

Aquí está el código

 <script type="text/javascript"> function load_previous(){ if(questionno=="1"){ load_questions(questionno); }else{ questionno=eval(questionno)-1; load_questions(questionno); } } function load_next(){ questionno=eval(questionno)+1; load_questions(questionno); <!------------------change ------bgcolor-------question number navigation------------------> if(document.getElementById('r1').checked) { document.getElementById("quest-number").style.backgroundColor = 'Green'; document.getElementById("quest-number").style.color = 'white'; }else if(document.getElementById('gender_Female').checked) { document.getElementById("r1").style.backgroundColor = 'gray'; document.getElementById("quest-number").style.color = 'black'; } } </script> <!------------------------SAVE----ANSWER----------------------> <script> function radioclick(radiovalue, questionno){ var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { } }; xmlhttp.open("GET", "ajax/save_answer_in_session.php?questionno="+ questionno + "&value1=" + radiovalue, true); xmlhttp.send(null); } </script>![enter image description here](https://i.stack.imgur.com/94cnP.jpg)
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!