用jquery 改变文本框的id,为啥前4个可以改变,后面的就变不了了 - Web 开发 / Ajax
//复制一行 var tr = $("#copyClass tr").eq(1).clone(); tr.find(":text").eq(0).attr("id","student_rqbbid_morev_"+y);//改变id tr.find(":text").eq(0).attr("id","student_rqbbid_moren_"+y);//改变id tr.find(":text").eq(1).attr("id","student_class_morev_"+y);//改变id tr.find(":text").eq(1).attr("id","student_class_moren_"+y);//改变id tr.find(":text").eq(2).attr("id","student_xuefeibz_moren_"+y);//改变id tr.find(":text").eq(2).attr("id","student_xuefeibz_morev_"+y);//改变id tr.find(":text").eq(3).attr("id","student_yh_moren_"+y);//改变id tr.find(":text").eq(3).attr("id","student_yh_morev_"+y);//改变id tr.find(":text").eq(4).attr("id","student_yhje_moren_"+y);//改变id tr.find(":text").eq(4).attr("id","student_yhje_morev_"+y);//改变id tr.find(":text").eq(5).attr("id","student_xfys_moren_"+y);//改变id tr.find(":text").eq(5).attr("id","student_xfys_morev_"+y);//改变id tr.find(":text").eq(6).attr("id","student_xfss_moren_"+y);//改变id tr.find(":text").eq(6).attr("id","student_xfss_morev_"+y);//改变id tr.appendTo("#copyClass");