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

134
Views
El valor no se captura ni actualiza a partir de la entrada del usuario

Estoy tratando de hacer que cuando el usuario haga doble clic en un elemento html, se convierta en un campo de entrada.

En este punto, quiero capturar y actualizar el campo para que sea lo que ingresó el usuario. Mi código actual está produciendo una salida vacía. Estoy pensando que es mi última línea de código la que causa el problema.

 dktcell_1.addEventListener('dblclick', function () { //add double click event to cell 1 docket# with anonymous function dktcell_1.innerHTML = "<input id=samcel type=text>" // change html element to input field dktcell_1.addEventListener('keypress', function (e) {//nested keydown event added with e paremeter to access event object properties if (e.code === 'Enter') { //check if the user presses "enter" dktcell_1.innerHTML = dktcell_1.textContent; //capture value entered and update html element } }) })
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!