Jquery, set value of td in a table?
Solution 1:
use .html()
along with selector to get/set HTML:
$('#detailInfo').html('changed value');
Solution 2:
From:
- Manipulation | jQuery API Documentation
it could be:
.html()
In an HTML document, .html()
can be used to get the contents of any element.
.text()
Unlike the .html()
method, .text()
can be used in both XML and HTML documents. The result of the .text()
method is a string containing the combined text of all matched elements.
.val()
The .val()
method is primarily used to get the values of form elements such as input
, select
and textarea
. When called on an empty collection, it returns undefined
.
Solution 3:
You can try below code:
$("Your button id or class").live("click", function(){
$('#detailInfo').html('set your value as you want');
});
Good Luck...