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

119
Vistas
Search and replace data-reactid

I am trying to look for data-reactid value and replace it with another value.

Here is the code:

Book a Room.

trying to use the code to replace ".0.2.2" with ".0.2.3"

(function () {
    var link = document.querySelectorAll('a[data-reactid*=".0.2.2"]') //change example.com to any domain you want to target
    var searchString = ".0.2.2" //the string to be searched forEach
    var replacementString = ".0.2.3" //the replacement for the searched string 
    
    links.forEach(function(link){
        var original = link.getAttribute("data-reactid");
        var replace = original.replace(searchString,replacementString)
        link.setAttribute("data-reactid",replace)
    })
})();
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Just change this

var link = document.querySelectorAll('a[data-reactid*=".0.2.2"]')

to this

var links = document.querySelectorAll('a[data-reactid*=".0.2.2"]')

But keep in mind that you should not change the attributes set by React itself

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