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

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

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 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