HTML 表格输出JSON
螺栓型号 | 螺栓规格 | 数量 | 操作 |
var table = $('#boltAreaDetailType').tableToJSON({ extractor: { 0: function (cellIndex, $cell) { return $cell.find('option:selected').val(); }, 1: function (cellIndex, $cell) { return $cell.find('option:selected').val(); }, 2: function (cellIndex, $cell) { return $cell.find('input[type=number]').val(); } }, ignoreColumns: [3] });