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