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

137
Views
"TypeError no detectado: el control no es una función" no hay sitio web html de error tipográfico

Este fragmento de código está destinado a llamar a una función, llamada "verificar ()" y devolver un valor dependiendo de si ciertos botones de opción están marcados, en el elemento span con id "ans".

 <head> <script> var check = 0 function check() { // Where the function is set if (document.getElementById("hig").checked) { check+=1 } if (document.getElementById("med").checked) { check+=1 } if (document.getElementById("low").checked) { check+=1 } document.getElementById("ans").textContent="You got " + check + "/3" } </script> </head> <body> <center> <h2>What radiation does:</h2> <h3>Penetrating Power:</h3> Alpha Radiation: <span id="a"></span> <br> <input type="radio" name="a" id="hig"> <input type="radio" name="a" id="med"> <input type="radio" name="a" id="low"> <br> Beta Radiation: <br> <input type="radio" name="b" id="hig"> <input type="radio" name="b" id="med"> <input type="radio" name="b" id="low"> <br> Gamma Radiation: <br> <input type="radio" name="g" id="hig"> <input type="radio" name="g" id="med"> <input type="radio" name="g" id="low"> <br> High/Medium/Low <br> <button onclick="check()">Check</button> <!--Where the function is called--> <span id="ans"></span> </center> </body>

Sin embargo, cuando se llama a "verificar()", devuelve el código de error: "Error de tipo no detectado: la verificación no es una función".

No parece ser un error tipográfico, como lo que puedo ver hasta ahora.

¿Algunas ideas?

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

0

El nombre de su función es el mismo que el de la variable, solo elija un nuevo nombre para la función

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!