下面是那一段的代码 如果不熟悉 下面的是网页
原问题
这一段代码 就是弹出的字体要红色 弹出的框 要剧中
function updateSumDiff() {//更新合计和差距
var sum = [];//每营养小计
tbFood.find('tr').each(function () {
$('td:gt(2)', this).each(function (index) {
sum[index] = (parseInt(this.innerHTML) || 0) + parseFloat(sum[index] || 0);
});
});
if (sSex.val() != '请选择') {
var tHead = $('#tab_Test3 tr:first td')
var s = '';
tdAges.each(function (index) {
var v = ((parseInt(this.innerHTML) || 0) + parseFloat(sum[index] || 0));
tdSums.eq(index).html(v);
v = (parseInt(this.innerHTML) || 0) - parseFloat(sum[index] || 0);
tdDiffs.eq(index).html(v).css('color', v < 0 ? 'red' : 'black');
if (v < 0) {
s += tHead.eq(index+3).text() + '需要补充!\n';
}
});
//////////////缺少提示
if (s) alert(s)
}
}
function href(o) {
window.open('foodcalculation1.html?' + encodeURIComponent($(o).closest('tr').find('td:first').text()))
//$(o).click((function(){
// window.location.href="http://www.jisuan360.com/foodcalculation1.html";
//}))
}