当文本框更改时,如何在网格视图中获取带有jquery的标签总和

问题描述:

如何在网格视图中获取带有jquery的标签总和

im有文本框,另一列为标签,需要在文本框更改时显示页脚总数的总和

我的文本框总计在文本框更改事件上工作正常,但标签总数不起作用,因为我不知道标签文本将被更改时将使用哪个事件



我尝试过:



$([id * = GvList] [id * = labelValue])。on(change,function()

{

var total = 0;

$($([ id * = GvList] [id * = labelValue]))。each(function()

{

if(!isNaN(parseInt($(this).val ()))){

总计+ = parseInt($(this).val());

}

});
$([id * = GvList] [id * = lbl_PY_total])。html(总计);

}

);

how can i get the sum of label with jquery in grid view
i m having text box , with another column as label and need to display sum of total in footer when text box will be change
my text box total is working fine on text box change event, but total of label not working, as i don't know which event will be used when label text will be change

What I have tried:

$("[id*=GvList] [id*=labelValue]").on("change", function ()
{
var total = 0;
$($("[id*=GvList] [id*=labelValue]")).each(function ()
{
if (!isNaN(parseInt($(this).val()))) {
total += parseInt($(this).val());
}
});
$("[id*=GvList] [id*=lbl_PY_total]").html(total);
}
);

([id * = GvList] [id * = labelValue])。on(change,function()

{

var total = 0;
("[id*=GvList] [id*=labelValue]").on("change", function ()
{
var total = 0;



([id * = GvList] [id * = labelValue]))。each(function()

{

if(!isNaN(parseInt(
("[id*=GvList] [id*=labelValue]")).each(function ()
{
if (!isNaN(parseInt(