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

105
Views
javascript : changing the whole style of a page when clicking the button

I made a keyboard with html and css. I have a button in it and I want that when I push it, the other buttons change.(for example if it was 3, I want it to be # when I click on the button)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

this can be a simple example . when you push change whole buttons all the buttons will be #.

const simpleButtons = document.querySelectorAll('.simple-button');
const lordButton = document.querySelector('.lord-button');

lordButton.addEventListener('click', () => {
  simpleButtons.forEach(item => {
    item.textContent = "#";
  });
});
.simple-button {
  background-color: #6366F1;
  color: #ffffff;
  padding: 5px 10px;
  border: none;
  border-radius: 4px;
  margin-bottom: 10px;
  cursor: pointer
}
 <button class="simple-button">3</button>
 <button class="simple-button">3</button>
<br />
<br />
<br />

<button class="lord-button">change whole buttons</button>

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!