且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在HTML表格中获取行索引

更新时间:2023-01-29 14:17:10

您可以这样使用

$("button").click(function () {
    var inputValue = $(this).closest("tr").find("input[type=text]").val();
    var selectValuse = $(this).closest("tr").find("[name='select_job']").val();
    var index = $(this).closest("tr").index();
});