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

319
Visualizações
Change Button Value/Display Text Using Javascript

I'm using a plugin (so I do not have access to edit HTML) for an age verification pop-up on my website. I want to change the text displayed on each of the two buttons, which is currently being pulled from the HTML value attribute.

enter image description here

This is the HTML for each button:

<input type="button" name="confirm_age" id="confirm_age" value="I am 18 or older [Enter Site]" style="background-color:#2dc937; width:300px;" tabindex="1">

<input type="button" name="not_confirm_age" id="not_confirm_age" value="I am under 18" style="background-color:#cc3232; width:300px;" tabindex="1">

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

As @vanblart said you can use:

document.querySelector("#confirm_age").value = "New Value"

If the plugin takes its time to render the buttons you can wrap the above code in a timer with setTimeout():

setTimeout(function() {
    document.querySelector("#confirm_age").value = "New Value"
}, 2000);
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