How To Show Result Data In Id Follow Value In Input Type Text?
i want to show result data in id myplace follow value in id='number' if i want to show result in id='myplace5' if &
Solution 1:
I suppose data
is html containing <input id="number" />
. If so, you can do:
$('#myplace'+ $(data).find("#number").val()).html(data);
Solution 2:
Since 'Myplace' is an input element, you can't use 'text' or 'html' as you would normally.
Instead what you need to do is use jQuerys 'val' function, as follows:
$("#myplace").val(html.data);
'html.data' will contain the data that you obtained from your web service, and the call to vall will make sure that it's added to the elements value property.
Post a Comment for "How To Show Result Data In Id Follow Value In Input Type Text?"