我通过复制then,然后复制th宽度来克隆一个表标题行。但这是失败的,因为宽度被写为(宽度减去W)像素时边框:'Wpx‘和边框折叠:’折叠‘。如果不设置边框折叠,则正确写入宽度。
“守则”很简单:
var arr = [];
// copy html, where abc is the destination <tr> and def is the source
$abc.html($def.html());
// now copy widths of table header cells
$def.children().each(function() {arr.p