var a=['ID','姓名','属性'] $("a").click(function(){ $('table').prepend('' +''+a[0]+'' +''+a[2]+'' +''+a[1]+'' +'') })