lolka84,
посмотрите тут
и возможный вариант
function summitog1() {
var table = document.getElementById("one"),
summyeval = document.getElementById("summitogye1"),
summrurval = document.getElementById("summitogrur1"),
sumye=0,sumrur=0;
for (var i=1;i<table.rows.length-2;i++) {
var td = table.rows[i],o1 = td.cells[4],o2 = td.cells[5];
o1 = o1.getElementsByTagName('input')[0];
o2 = o2.getElementsByTagName('input')[0];
if(!isNaN(Number(o1.value)))sumye +=Number(o1.value);
if(!isNaN(Number(o2.value)))sumrur +=Number(o2.value);
}
if (sumye && sumrur ){
summyeval.value = (sumye).toFixed(2);
summrurval.value = (sumrur).toFixed(2);
}
}