<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> </head> <body> <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.js"></script> <script src="linq.min.js"></script> <script type="text/javascript"> //功能说明:获取所有选中行的id var selectRows = [ { Id: 1, Name: "name1", Age: 1 }, { Id: 2, Name: "name2", Age: 2 }, { Id: 3, Name: "name3", Age: 3 } ]; var ids = Enumerable.from(selectRows).select(function (m) { return m.Id; }).toArray(); console.log(ids); </script> </body> </html>