floatDecimal.html
This is my HTML page.
Javascript rounds to two decimal places
function count(){
//alert( "count");
var size=~~(document.getElementById("size").value);
var value=0;
for(var i=0;i var val=1*(document.getElementById("afterAdjScor" i).value);
if(null!=val){
value =Math.round((1*(value val) )*100)/100;
}
}
if(isNaN(value)){
value="The input must be a numeric type";
}
document.getElementById( "total").value=value;
}
Description:~~XX: String to int
1*XX: String to float
Math.round((1*(value val))*100)/100: Rounding