Business
Jobs
  • About Us
  • Solutions
    • Candidates
      Highly qualified candidates in 48h.
    • Assessments
      500+ technical and psychological assessments, plus anti-fraud system.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Pay in 15+ LATAM countries without setting up a local entity.
  • Pricing
  • Jobs

0

229
Views
¿Es posible enviar el valor del evento a la función secundaria?

Estoy creando una ventana emergente de confirmación.

 function addingCoin() { const table = document.querySelector('.list__table'); const addCancelBtn = document.getElementById('list__popup__cancel'); const addConfirmBtn = document.getElementById('list__popup__confirm'); const addChecker = document.querySelector('.list__popup'); table.addEventListener('submit', (event) => { event.preventDefault(); addChecker.classList.toggle('hidden'); addCancelBtn.addEventListener('click', () => { addChecker.classList.toggle('hidden'); }); addConfirmBtn.addEventListener('click', () => { addChecker.classList.toggle('hidden'); const coinAmount = event.target.inputAmount; };

Quiero enviar el evento a la función secundaria para que la variable "coinAmount" funcione correctamente. ¿Hay alguna opción para hacer esto?

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

0

Sí, debería poder hacerlo de esta manera creando una nueva función

 const header = document.querySelector("#__next > div > header"); const headline = document.querySelector("#__next > div > main > main > div > header > h3"); header.addEventListener("click", (event) => { headline.addEventListener("click", () => { handleClick(event); }); }) function handleClick (theEvent) { console.log(theEvent); // Log for the event => PointerEvent {isTrusted: true, pointerId: 1, width: 1, height: 1, pressure: 0, …} }

Espero que esto te ayude.

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 Our process Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!