JS 取控件或者DIV的尺寸与大小,

 var tr=itemtab.rows[i];
 var oRect = tr.getBoundingClientRect();
 var top = oRect.top;
 var btm = oRect.bottom;
 var itemtr=btm-top;//货品第一行+再加上记录的高度

 

你可能感兴趣的:(div)