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

91
Views
no sé cómo volver a agregar la entrada del usuario al DOM y creo que es algo con mi código js

no se que hacer

Necesito ayuda con este script js y solo necesito saber cómo mostrar una entrada de usuario en una plantilla de estilo html que hice pero simplemente no sé cómo

 <!-- add email side nav --> <div id="side-form" class="sidenav side-form"> <form class="add-email container section"> <h6>add a new email</h6> <div class="divider"></div> <div class="input-field"> <input keypath="email" placeholder="example@gmail.com" id="title" type="text" class="validate"> <label for="title">write email here</label> </div> <div class="input-field"> <label> <input type="checkbox" /> <span>Notifications</span> </label> </div> <br> <div class="input-field center"> <button class="btn-floating blue pulse" id="add_email" onclick="getValue()">Add</button> </div> </form> </div>

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

0

Agregue esto a su archivo JS o etiqueta <script> :

 const userInput = document.getElementById("title") userInput.addEventListener("keyup", (e) => { // append e.target.value to the page document.createElement("p").innerText = e.target.value; });

Lo anterior agregará un párrafo a su página con el valor del correo electrónico en él. Ahora es parte de la Dom. Obviamente, cambiará la lógica dentro del detector de eventos para representarlo en su página de manera adecuada. Alternativamente, puede configurar un detector de eventos en el botón Agregar y renderizarlo desde allí.

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!