Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

165
Vistas
When I click on a radio button the checked attribute doesn't change

So I have this bit of code and I want it to change its selected attribute when I click on the other radio button.

<fieldset>
  <legend class="h4">Formati:</legend>
  <label class="radio-inline">
    <input type="radio" name="version_printimi" value="A4">A4
  </label>
  <label class="radio-inline">
    <input type="radio" name="version_printimi" value="Skontrino" checked="checked">Skontrino
  </label>
</fieldset>

They are inside a form and visually the radiobuttons do get changed but I need the changed attribute to change as well.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

you can use onchange event listener to both of the input tags to detect change, then call a function that adds an attribute to one of the radio inputs using setAttribute and remove an attribute from other radio using removeAttribute.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda