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 trialroxas shee
Courses Plus Student 2,445 PointsMy code keeps showing me "[object HTMLInputElement]"
Im trying to use the createElement method to create an <input> inside of a <li>. That said, on the preview mode the input
https://i.ibb.co/64GN9K6/Screenshot-2020-03-26-at-17-02-03.png
Is there anything i could do to make the input space looks exactly the same as the input value above?
1 Answer
Mark Sebeck
Treehouse Moderator 37,799 PointsYou are close. You don't need the line let input = ...
Also your innerhtml should look something like this
li.innerHTML = "<input> Dance";
instead of li use what you called the variable. Let me know if you need more help
Mark Sebeck
Treehouse Moderator 37,799 PointsMark Sebeck
Treehouse Moderator 37,799 PointsYou may also need to delete the setAttribute line before the appendChild