Using the following code
var newDiv = $(document.createElement("div"));
newTextBox = $(document.createElement("input"))
<input name="textbox" id="textbox" type="text">
newTextBox = $("<input/>");
jQuery will not put the value into the created element's generated html. Both
.attr('value', 'blah') and
.val() get the current value of what's been entered or changed in the text input, and allow you to see that value when you look at the input on the page or submit it to the server. However, you will not see it when looking at the html.
You can still manipulate the value all you want, you just won't see any changes in firebug, like you do with class changes, styling, etc.
AFAIK, this is the same without using jQuery. The same thing happens with:
document.getElementById('textbox').value = 'my text';
Also, it depends on the type of input that you're using. For example, you will see the value attribute changes with a hidden input, but not with the textbox.
By appending newDiv to the body, the text box and the value show up using your code. Here's a test page. You can see both the code and the preview of what happens. The alert though, does not show any 'value' attribute for reasons explained above.