📌  相关文章
📜  如何通过单击按钮获取当前行值 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:25.898000             🧑  作者: Mango

代码示例1
jQuery(document).ready(function( $ ){    jQuery('body').bind('DOMNodeInserted DOMNodeRemoved', function() {      jQuery(".modal-body tr .btn").on('click', function(){        var currentRow =jQuery(this).closest("tr");        var surename=currentRow.find ("td:eq(2)").html();        var tc_name=currentRow.find ("td:eq(3)").html();        var tele_phone=currentRow.find("td:eq(4)").text();        var e_mail=currentRow.find("td:eq(5)").text();                 jQuery(".get_organization_teacher_surname").val(surename);         jQuery(".get_organization_teacher_name").val(tc_name);        jQuery(".get_organization_teacher_email").val(e_mail);        jQuery(".get_organization_teacher_phone").val(tele_phone);                    });});});