Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!