Podrias usar la funcion una vez para hacer las dos cosas
Código Javascript
:
Ver originalfunction agregarNumero(valor,cantidadEnPantalla){
if(valor.value==null | valor.value==0)
form.operando1.value=cantidadEnPantalla;
form.operando2.value=cantidadEnPantalla;
else
form.operando1.value+=cantidadEnPantalla;
form.operando2.value+=cantidadEnPantalla;
}
Código HTML:
Ver original<input type="button" value="1" style="WIDTH: 32px; HEIGHT: 28px"
onclick="agregarNumero('1');">