+ 3
How can i append an input value in jquery
i have an input tag with a value of 0 and also a button with id 1...is there anyway i can click the button to append the value of the input tag, have done this with a p tag, its working fine, here is my code for that of input tag. $("#one").click(function() { $("input :value").append(1); });
5 Respostas
+ 7
// You can make 1 in string but in number,
// I'm not sure if he have a error in the code.
+ 2
$("#one").click(function(){
$(this).val(1);
});
+ 2
I think this works
$("#one").click(function() {
$("input").attr("value").append(1);
});
+ 1
its not working also for string bro
+ 1
thanks all...i decided not to use input again, am now using span tag. and its working fine