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

195
Visualizações
How to change textbox value using javascript? It automatically set it back to the old value

I am trying to change the value of a text field.

Code of text field:

<div class="StyledInputLabelWrapper-sc-1lelz3z-0 bORxnu">
<label color="#ff0000" font-size="sm" for="shipping_lastname" id="shipping_lastname-label" 
class="StyledInfoTypo-sc-1jga2g7-0 hYfxVN StyledLabel-sc-1lelz3z-1 fVraJv">Nachname</label>
<input autocomplete="shipping family-name" name="shipping_lastname" maxlength="50" 
id="shipping_lastname" placeholder="" type="text" aria-invalid="true" aria-required="false" 
data-test="shipping_lastname" class="StyledInput-sc-6brnnh-1 gAQsdK" value=""></div>

And the code of the event:

function(e, t, n, r) {
  De || Ne();
  var o = Zt,
    i = De;
  De = !0;
  try {
    Ie(o, e, t, n, r)
  } finally {
    (De = i) || Ue()
  }
}

I tried to change the value via Javascript with:

document.queryselector('#shipping_firstname-label').value = "myValue";

But whenever I move my mouse, the value in the text field will automatically set back to the previous value.

Any tips/ideas on how I can fix this?

Let me know if you need more infos. Thanks!

about 4 years ago · Juan Pablo Isaza
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