// The overall idea remains the same: Insert a new table with only the header in it, and set the height of the data table to scroll.
// Because the width of the table header changes according to the content or the content of the following row, we need to use the col mark to fix its width. The format is as follows: <Col width = '200px '> </COL>
// Method call: You can directly upload the ID of the table and the height you want to scroll to jquery. FN. outerhtml = function (s) {return s? This. before (s ). remove (): jquery ("<p>" ).append(this.eq(0).clone()).html () ;}; // This is used to obtain all the HTML elements. It is used to copy the header below, because you need to copy the style when copying the header (if there is no style in it, it will be avoided ..) Function fixheader (tableid, height) {var table =$ ("#" + tableid); var headers = table. Find ("th"). length> 0? Table. find ("th"): Table. find ("TR: First"); var colhtml = ""; // ignore the last Col and let it adapt itself to for (VAR I = 0; I