+ 3
What does the val() do in this code?
I don't know what the val() means here. $(function() { $("#name").keydown(function() { $("#msg").html($("#name").val()); }); })
2 Respostas
+ 13
Gets the value of input with id "name" and assigns it to the element with id "msg"....
(val() is used for inputs, html() is used for all other elements...)
+ 3
(val also used for textarea element)