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 trial

JavaScript

Finding Mozilla MDN Documentation for '.value' JS Property

I am working through the build interactive web pages with javascript project with the to do list.

One of the properties that the instructor uses is .value. I wanted to head on over to the modzilla MDN to read more about it; however, all I can find is .values plural, on this page: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/values.

.value is definitely a property, sublime even recognizes it as such. Why can't I find a documentation page for it?

4 Answers

Hi Chris,

I think you're looking for this page: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement

This page has all the properties and methods available to input elements.

You'll find the value property towards the end of the properties section.

Here's one thing you can do when you find yourself stuck like this and not really sure what to even search for.

First, look at the code and figure out what element you're calling the value property on. In this case, we know it's a text input control.

You can then search for the input element on mdn. Here's that page: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input

The last entry in the summary table tells you the DOM Interface that this element implements. In this case it's HTMLInputElement. Clicking that link brings you to the first link I gave you.

look on the jquery website? http://api.jquery.com/val/

gives examples, if you haven't tried out the jquery course id definitely recommend doing it before the interactive web pages course.

This is not using jquery, this is javascript only.