Usa el objeto Math.round():
Código Javascript
:
Ver originalfunction suma(){
var total=0;
for (var i=0;i<5;i++){
total+=parseFloat(document.getElementById("input"+i).value);
}
document.getElementById('divBase').innerHTML=Math.round(total);
document.getElementById('divIVA').innerHTML=Math.round(total*parseFloat(document.getElementById("tpiva").value)/100);
document.getElementById('divTotal').innerHTML=Math.round(total*(1+parseFloat(document.getElementById('tpiva').value)/100));
}
}