for(i=0;i<Box.length;i++)這I有疑問,望大神解答。不然睡不著
var arr=new Array(); ? ? ? ? ? ? ?for(i=0;i<Box.length;i++) ? ? ? ? ? ? ?{ ? ? ? ? ? ? ? ? if(i<BoxRows) ? ? ? ? ? ? ? ? { ? ? ? ? ? ? ? ? ? ? ? arr.push(Box[i].offsetHeight) ? ? ? ? ? ? ? ? } -----------分割線------------ 為什么是for(i=0;i<Box.length;i++),而我寫成for(Box[i]=0;i<Box.length;i++)卻不行?感覺沒問題啊
2017-08-23
arr 是一個數組,目的應該是為了獲取數組里的arr的高度,有兩種寫法
1.arr[i]=Box[i].offsetHeight(若設外邊距需注意)
2.arr.push(Box[i].offsetHeight)
不懂再回復
2017-07-20
var arr=new Array();
? ? ? ? ? ? ? for(i=0;i<Box.length;i++)
? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ?if(i<BoxRows)
? ? ? ? ? ? ? ? ?{
? ? ? ? ? ? ? ? ? ? ? ?arr.push(Box[i].offsetHeight)
? ? ? ? ? ? ? ? ?}
_________________分割線——————————————————
不知道怎么沾一起了。