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

196
Visualizações
How to overwrite HTML node before it loads original content?

I am building a javascript file which find the tag on the page and overwrite what HTML has in e.g. when the page load the HTML is seen <h1>This is innerHTML </h1> and after the js file has loaded, it is <h1>This para has been reloaded</h1>.

If the net is fast it won't be visible but as I am creating it for end user/testing, I want to assume the internet is slow so only the JS code is loaded in the selector.

Is it possible?

    <div>
        <p id="one">This is the inner Text</p>
    </div>
let p = document.getElementById("one");
p.innerHTML = "This is now rewritten"
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can make the div visible after your desired event completion like this:

let p = document.getElementById("one");
p.innerHTML = "This is now rewritten";
document.getElementById('myContent').style.display="block";
#myContent{
display:none;
}
<div id="myContent">
 <p id="one">This is the inner Text</p>
 </div>

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