js循环function函数问题

下面这段js循环出不来,为了实现下面的功能,求高手解决下

<input type="submit" name="Submit1" value="提交" onclick="button1('button11')"/>
<input type="submit" name="Submit2" value="提交" onclick="button2('button21')"/>
<input type="submit" name="Submit3" value="提交" onclick="button3('button31')"/>
<input type="submit" name="Submit4" value="提交" onclick="button4('button41')"/>
<input type="submit" name="Submit5" value="提交" onclick="button5('button51')"/>
<br>
<input type="text" name="textfield" />

<script>
for (i=1;i<6;i++)
{ var obj = eval("button"+i);
function obj(xiao)
{
document.getElementById('textfield').value=xiao
}
}
</script>
那要实现下面的功能该怎么弄啊
<input type="submit" name="Submit1" value="提交" onclick="button('1')"/>
<input type="submit" name="Submit2" value="提交" onclick="button('2')"/>
<input type="submit" name="Submit3" value="提交" onclick="button('3')"/>
<input type="submit" name="Submit4" value="提交" onclick="button('4')"/>
<input type="submit" name="Submit5" value="提交" onclick="button('5')"/>
<br>
<input type="text" name="textfield1" />
<input type="text" name="textfield2" />
<input type="text" name="textfield3" />
<input type="text" name="textfield4" />
<input type="text" name="textfield5" />
<script>

function button(i)
{ temp=eval("textfield"+i);
document.getElementById("temp").value='xiao'+i
}

</script>
你为什么要用那么多方法呢?
要实现你磨郑的功能 调用同一方法就好啊? 不但不长 还简单。

<input type="button" name="Submit1" value="提御者交" onclick="button('button11')"/>
<input type="button" name="Submit2" value="提交" onclick="button('button21')"/>
<input type="button" name="Submit3" value="提交" onclick="瞎拆颂button('button31')"/>
<input type="button" name="Submit4" value="提交" onclick="button('button41')"/>
<input type="button" name="Submit5" value="提交" onclick="button('button51')"/>
<br>
<input type="text" name="textfield" />

<script>

function button(xiao)
{
document.getElementById('textfield').value=xiao
}

</script>