$("tbody tr").click(function(){ //获取选中行的所有值 var trval = $(this).closest("tr").html() console.dir(trval); //获取选中行的第二列中span标签的值 var trid= $(this).find("td").eq(1).find("span").html(); console.log(trid); })