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

85
Vistas
Append closing then opening HTML tag with Javascript/Jquery

I have a scenario and in that I want to append a closing tag then some other tag after that opening Tag of the first closed Tag. For Example: I have this code <ins>123678</ins> and I want to append <b>46</b> in between 3 and 6. I tried this code while putting my cursor in between 3 and 6

document.execCommand('insertHTML',false,'</ins><b>45</b><ins>');

But it is not giving me desired output. I want my output like this

<ins>123</ins><b>45</b><ins>678</ins>
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You could try to replace

<ins>123678</ins>

with

newHTML= "<ins>123"+"<b>45</b>"+"678</ins>"

using jquery

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