function toBin(form,i) {
base = checkvalue(form.base[i].value);
num = checkvalue(form.num[i].value);
sum = eval(base)+eval(num);
alert(comma(sum));
form.amount[i].value=comma(sum);
}
<% for i = 0 to 1 %>
<input type=text name=num size=8 value="100,000"> +
<input type=text name=base size=8 value="200,000"> =
<input type=button value="ÇÕ°è" onclick="toBin(this.form,<%=i%>)">
<input type=text name=amount size=15>
<% next %>