//四舍五入取值
function formatFloat(src,pos){
src= Math.round(src*Math.pow(10,pos))/Math.pow(10,pos);
return src;
}
src= Math.round(src*Math.pow(10,pos))/Math.pow(10,pos);
return src;
}
//
$('#mytable tr td:nth-child(2)').each(function(){
sum+=Number($(this).text());
});
sum+=Number($(this).text());
});
list集合在table中每行只显示三条数据
sb.append("<TABLE border=\"1\">");
for (int i = 0; i < list.size(); i++) {
if (i%3==0) {
sb.append("<TR>");
}
sb.append("<TD>"+"aaaaaa"+"</TD>");
if (i%3==2) {
sb.append("</TR>");
}
}
sb.append("</TABLE>");
for (int i = 0; i < list.size(); i++) {
if (i%3==0) {
sb.append("<TR>");
}
sb.append("<TD>"+"aaaaaa"+"</TD>");
if (i%3==2) {
sb.append("</TR>");
}
}
sb.append("</TABLE>");