Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

315
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!