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

267
Views
event.preventDefault() no funciona en el envío del formulario

Estoy tratando de enviar el formulario, pero la página se actualiza después de presionar el botón Enviar y event.preventDefault() no parece funcionar.

 class UI { constructor() { this.budgetForm = document.getElementById("budget-form"); } //submit budget method budgetSubmitForm() { console.log('hello from es6'); } } function eventListenters() { const budgetForm = document.getElementById("budget-form"); const expenseForm = document.getElementById("expense-form"); const expenseList = document.getElementById('expense-list'); // New instance of UI class const ui = new UI(); // budgetForm submit budgetForm.addEventListener('submit', function(event) { event.preventDefault() ui.budgetSubmitForm() }); // expense form submit expenseForm.addEventListener('submit', function(event) { event.preventDefault(); }); // expense list click expenseList.addEventListener('click', function() { }); } document.addEventListener('DOMcontentLoaded', function() { eventListenters(); })

¡Realmente agradeceré que alguien me ayude!

about 4 years ago · Juan Pablo Isaza
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!