Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

118
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda