I have used jQuery to populate the value of a text input.
$(".textInput").val("foo");
When I look at the page, "foo" appears in the input, however, when I inspect the element in Chrome, "foo" is nowhere to be seen in the HTML.
Also, I have done something similar with a element using .text() and it worked fine (despite the fact that jQuery's docs say you can only use .val()).