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

171
Views
getElementById no funciona solo con un elemento, sino que funciona para otros

Un getElementById no funciona aunque los demás sí, todo está escrito correctamente y la sintaxis es correcta. testTitle no devuelve nada en la consola aunque los demás sí, he intentado reorganizar las líneas pero da como resultado lo mismo.

 <!--test name--> <div class="row"> <div class="col s6 offset-s3"> <div class="input-field"> <input type="text" id="testTitle" required /> <label for="testTitle">test name</label> </div> </div> </div> <!--subject--> <div class="row"> <div class="col s6 offset-s3"> <div class="input-field"> <input type="text" id="testSubject" required /> <label for="testSubject">subject</label> </div> </div> </div> <!--test date--> <div class="row"> <div class="col s6 offset-s3"> <div class="input-field"> <input type="text" class = "datepicker" id="testDate" required /> <label for="testDate">test date</label> </div> </div> </div>
 add.addEventListener('click', async (e) => { const testSubject = document.getElementById("testSubject").value; const testDate = document.getElementById("testDate").value; const testTitle = document.getElementById("testTitle").value; console.log(testTitle); console.log(testSubject); console.log(testDate); });
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!