Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDiego Palma
12,653 PointsI'm getting the following error in the console (my code is exactly the same as the one in the video)
app.js:2 Uncaught TypeError: Cannot read property 'querySelector' of null at app.js:2
const form = document.getElementById('registar');
const input = form.querySelector('input');
form.addEventListener('submit', (e) => {
console.log(input.value);
});
2 Answers
Guil Hernandez
Treehouse TeacherHey Diego Palma,
It looks like you're missing an r
in .getElementById('registrar')
. :)
nfs
35,526 Pointstypos are treacherous...
Diego Palma
12,653 PointsDiego Palma
12,653 PointsMuchas gracias :)
HIDAYATULLAH ARGHANDABI
21,058 PointsHIDAYATULLAH ARGHANDABI
21,058 PointsSir I get the li tag empty when i read it to the console