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

175
Vistas
Dynamically replace checkboxlist display text

Could someone help me if there is any way to dynamically change the text of a checkboxlist control display text without removing the checkbox icon. I got the following HTML code:

<div class="classname1">
<div class="row checkbox-list list-container">
<label for="Example_Id">
<input type="checkbox" name="Example.Id" id="Example_Id" value="3"> Replace this text.
</label>
</div>
</div>

Is there any way to change this entire text. Appreciate your help!!!

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

0

You can do this:

  • Wrap the text inside a span
  • Search for the label of the input using input.labels array
  • Then, use label.querySelector('span') to get the span element
  • Update the span text using span.textContent = ...
const span = window.Example_Id.labels[0].querySelector("span");

span.textContent = value;

Codesandbox: https://codesandbox.io/s/focused-brown-w6so1r?file=/src/index.js:94-186

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