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

208
Visualizações
javascript can't change input value through console

hi so I can't change the value of classname, as it only changes the view not truly change I tried using

var search = document.getElementsByClassName("r-30o5oe");
var s = search[0];
s.value = "0.1";

https://imgur.com/a/FJTvyPU I've tried using setattribute but it never worked with getelementsbyclassname for me, only works with id (which that element doesn't have), and if I tried using

var search = document.getElementsByClassName("r-30o5oe")[0];
search.setAttribute("value", "2")

but it says undefined I just wanna change the value of twitter's search by console by classname its weird if I tried doing that to this page it works tho

document.getElementsByClassName("s-input__search")[0].value = "0.1"

any solutions?

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