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

241
Views
How do I save the current page data in html, css , javascript?

Am trying to save the button the user creates, when the browser is refreshed.Meaning I want it to permanently stay there.

Here is a snippet of what am taking about:

function create(){
  const a =  document.createElement("button")
  document.body.appendChild(a)
   const b = document.getElementById("buttoname")
   a.innerHTML = b.value
}
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>Create a button</h1>
Button name:<input id="buttoname" type="text"><br>

<button onclick="create()">Create Button</button>

</body>

   
</html>
Thank for your help it means a lot.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Check out localStorage - docs, you can save a variable there with the information for each created button. Then you need a function that will read the localStorage when the page loads and will create the described buttons

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!