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

213
Views
Ionic 5: cómo agregar un detector de eventos a la entrada de iones usando Javascript

Estoy tratando de agregar un detector de eventos a una entrada de iones para que cuando haya un cambio y se activen las funciones respectivas se ejecuten con la identificación pasada

Código

 <ion-input id="totalTimeOpening" type="text"></ion-input> <script> function testChange(id) { console.log(id + " Change"); } function testOnKeyUp(id) { console.log(id + " KEYUP"); } document.getElementById("totalTimeOpening").addEventListener('ionChange', testChange.bind('totalTimeOpening'), false); document.getElementById("totalTimeOpening").addEventListener('onkeyup', testOnKeyUp.bind('totalTimeOpening'), false); </script>

El código actual parece pasar todo el objeto de entrada de iones en

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

0

Me di cuenta de esto.

 function testChange(id) { console.log(id + " Change"); } function testOnKeyUp(id) { console.log(id + " KEYUP"); } document.getElementById("totalTimeOpening").addEventListener('ionBlur', function(){ testChange('totalTimeOpening') }); document.getElementById("totalTimeOpening").addEventListener('ionInput', function(){ testOnKeyUp('totalTimeOpening') });

las funciones tenían que ir dentro de function(){aquí}) y funciona. Además, parece que onkeyup no funcionará con ionic y, en cambio, ionInput parece funcionar como un sustituto

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!