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

javascript question, input#FormRow-normal-price.css-1wlt96c

input#FormRow-normal-price.css-1wlt96c

i want to change value of above input box, from google console, is the code written below is correct? please help

document.getElementById("FormRow-normal-price").value = "0.1";

1 Answer

Torben Korb
seal-mask
PLUS
.a{fill-rule:evenodd;}techdegree seal-36
Torben Korb
Front End Web Development Techdegree Graduate 91,433 Points

Hello Suraj,

this is exactly right. Just try out and it should change the value of the field. Make sure you don't have any other element in the document with the same ID. Also you're absolutely right to assign the value as string, because input field values are always strings, which is good to know.

Happy coding!