Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

114
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda