154
rated 0 times
[
155]
[
1]
/ answers: 1 / hits: 16286
/ 13 Years ago, wed, march 16, 2011, 12:00:00
If i have an input like so:
<input type=text id=textvalue />
the following code will change its value:
$(document).ready(function() {
$('#textvalue').val(hello);
});
however the following will not work:
$(document).ready(function() {
var = hello;
$('#textvalue').val(var);
});
Why does the second one not work? I need to be able to change the value of the textbox to the value of a variable
More From » jquery