PageSourceSearch

https://www.moi.gov.tw/Scripts/JAutoGenerateTableTH.js

js moi.gov.tw collected 2026-09-24 08:52:18 UTC 3,552 bytes, 56 lines download raw bytes

1$(function () {
2    var $page_content, th_col, th_row, col_count, col, row, $td, $th;
3
4    //20240104 此行加的id會導致無障礙無法通過
5    //if (0 < $("table").length) {
6    //    var $table = $("table");
7    //    for (i = 0; i < $table.length; i++) {
8    //        if (void 0 == $table.eq(i).attr("id") && $table.eq(i).attr("id", "table_" + i), $th = $table.eq(i).find("th"), 0 == $th.length) {
9    //            for ($td = $table.eq(i).find("td"), j = 0; j < $td.length; j++) {
10    //                if (row = $td.eq(j).parent().index() + 1, col = $td.eq(j).index() + 1, col_count = 0, 1 == row) {
11    //                    void 0 == $td.eq(j).attr("id") && $td.eq(j).attr("id", "table_" + i + "_" + j);
12    //                }
13    //                else {
14    //                    for (k = 0; k < $td.length; k++) {
15    //                        var td_row = $td.eq(k).parent().index() +
16    //                            1,
17    //                            td_col = $td.eq(k).index() + 1;
18    //                        1 == td_row && (col_count = void 0 == $td.eq(k).attr("colspan") ? Number(col_count) + Number(1) : Number(col_count) + Number($td.eq(k).attr("colspan")));
19    //                        if (col_count >= col) {
20    //                            void 0 == $td.eq(j).attr("headers") && $td.eq(j).attr("headers", $td.eq(k).attr("id"));
21    //                            break
22    //                        }
23    //                    }
24    //                }
25    //            }
26    //        }
27    //        else {
28    //            void 0 == $table.eq(i).attr("id") && $table.eq(i).attr("id", "table_" + i);
29    //            $th = $table.eq(i).find("th");
30    //            for (j = 0; j < $th.length; j++) void 0 == $th.eq(j).attr("id") && $th.eq(j).attr("id", "table_" + i + "_" + j);
31    //            $td = $table.eq(i).find("td");
32    //            for (k = 0; k < $td.length; k++) {
33    //                row = $td.eq(k).parent().index() + 1;
34    //                col = $td.eq(k).index() + 1;
35    //                var row_count = 0;
36
37    //                for (l = col_count = 0; l < $th.length; l++) {
38    //                    if (th_row = $th.eq(l).parent().index() + 1, th_col = $th.eq(l).index() + 1, 1 == th_row && (col_count = void 0 == $th.eq(l).attr("colspan") ? Number(col_count) + Number(1) : Number(col_count) + Number($th.eq(l).attr("colspan"))), col_count >= col) {
39    //                        void 0 == $td.eq(k).attr("headers") && $td.eq(k).attr("headers", $th.eq(l).attr("id"));
40    //                        break
41    //                    }
42    //                }
43
44    //                for (l = 0; l < $th.length; l++) {
45    //                    if (th_row = $th.eq(l).parent().index() + 1, th_col =
46    //                        $th.eq(l).index() + 1, 1 == th_col && (row_count = void 0 == $th.eq(l).attr("rowspan") ? Number(row_count) + Number(1) : Number(row_count) + Number($th.eq(l).attr("rowspan"))), row_count >= row) {
47    //                        var rowheaders = $td.eq(k).attr("headers");
48    //                        void 0 == rowheaders ? void 0 == $td.eq(k).attr("headers") && $td.eq(k).attr("headers", $th.eq(l).attr("id")) : (rowheaders = rowheaders + " " + $th.eq(l).attr("id"), void 0 == $td.eq(k).attr("headers") && $td.eq(k).attr("headers", rowheaders));
49    //                        break
50    //                    }
51    //                }
52    //            }
53    //        }
54    //    }
55    //}
56});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.