i used this code to adding multiple values.. bt it dsnt work . it didnt give me real answer.. plz some one can help me up..
function calc(y){
answer="0";
for(var co=1;co<=y;co++){
answer+=parseInt(document.getElementById(co).value);
}
document.getElementById("total").value=answer;
}
this code didnt give me sum of values. it gave like this.. (10101010). not of some of values. plz help me..