<script type="text/javascript">
$(function(){
$("input[type='button']").click(function(){
var id=$(this).attr("id");
//$.mytest.buttontest(id);
$("#input1").val(id);
})
});
//$.mytest={
//buttontest:function(obj){
//$("#input1").val(obj);
//}
//}
</script>
<input type="text" value="" id="input1" />
<input type="button" value="button1" id="button1" />
<input type="button" value="button2" id="button2" />
<input type="button" value="button3" id="button3" />
<input type="button" value="button4" id="button4" />
<input type="button" value="button5" id="button5" />
小弟新手~