codice:
function accoda(b){
	b.form.codice.value+=b.value
}
codice:
<form>
<input type="text" name="codice">
<input type="button" value="1" onclick="accoda(this)">
<input type="button" value="2" onclick="accoda(this)">
</form>
ciao