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

145
Views
Link which selects one of the buttons

Is it possible to select one of those 3 buttons with a URL link? I open the link and one of the buttons is already clicked.

Do I require to add a specific script?

<button id="uno" class="tablinks" onclick="openCity(event, '1')">
  one
</button>

<button id="dos" class="tablinks" onclick="openCity(event, '2')">
  two
</button>

<button id="tres" class="tablinks" onclick="openCity(event, '3')">
  three
</button>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Yes, it is possible. Are you sure you want to emit a button click or do you just want to invoke openCity with some arguments? If so, in your JavaScript, you can write:

window.onload = function() {
  openCity(3);
}

function openCity(buttonNum) {
  console.log(buttonNum); // '3'
} 

If you want to emit a button click, you can try:

window.onload = function() {
  const buttons = document.querySelectorAll('.tablinks');
  const firstButton = Array.from(buttons)[0];
  firstButton.click();
}
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!