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

161
Visualizações
I need to find which part of the javascript is generating this input element

So im working on this feature when user can edit the element, (HIS ID) the page has firewalls so its private it requires password to enter just to let you all know, but the problem is at the javascript part i think theres something generating an auto save input button that i cannot identify on the coding it only displays from the source. explaining: theres one button that you can use to save the changes you made to the element (you can see it below at the input tag) then theres a button above it that i cannot see on the open code but it only displays at the souce and i don't know where it comes from) Please someone help me remove it, that would save me hours of work!

<!DOCTYPE html>

<script data-ad-client="ca-pub-7267901485160871" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

<link rel='icon' href='favicon.png' type='image/x-icon'/ >

  
<script type="text/javascript">
function saveEdits() {
  //get the editable element
  var editElem = document.getElementById("edit");
  //get the edited element content
  var userVersion = editElem.innerHTML;
  //save the content to local storage
  localStorage.userEdits = userVersion;
  //write a confirmation to the user
}

function checkEdits() {
  //find out if the user has previously saved edits
  if(localStorage.userEdits!=null)
    document.getElementById("edit").innerHTML = localStorage.userEdits;
}

</script>


<div class="row">
  <div class="column">
    <div class="card">
  <div class="container">
  <h1 style="color: red;">ID</h1>
  <div id="edit" contenteditable="true">
  <body onload="checkEdits()">
  <p contenteditable="true" class="price">2447597194</p>
</div>
  </div>
  <input type="button" class="w3-btn w3-black" value="Ruaj ndrysh" onclick="saveEdits()"/>
  <p></p> 
  </div>
    </div>
  </div>
</div>

<div id="update"> - Edit the text and click to save for next time</div>
  
  
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Well I think itsn't javaScript what is generating the input, only this line of code:

<div id="edit" contenteditable="true">

is what making the input editable.

and in saveEdits() function you are saving the edited info into the localStorage, tharefore you are keep seing it even after a reloading of the page...I think!

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