JS代码:版权归原作者,仅供学习研究.
复制代码 代码如下:
/*
------------------------------------------------
PVIIEqualCSSColumnsscripts
Copyright(c)2005ProjectSevenDevelopment
www.projectseven.com
Version:1.5.0
------------------------------------------------
*/
functionP7_colH(){//v1.5byPVII-www.projectseven.com
vari,oh,hh,h=0,dA=document.p7eqc,an=document.p7eqa;if(dA&&dA.length){
for(i=0;i
for(i=0;i
dA[i].style.height=(h-(hh-h))+'px';}}}else{document.p7eqa=1;}
document.p7eqth=document.body.offsetHeight;
document.p7eqtw=document.body.offsetWidth;}
}
functionP7_eqT(){//v1.5byPVII-www.projectseven.com
if(document.p7eqth!=document.body.offsetHeight||document.p7eqtw!=document.body.offsetWidth){
P7_colH();}
}
functionP7_equalCols(){//v1.5byPVII-www.projectseven.com
if(document.getElementById){document.p7eqc=newArray;for(i=0;i
}
functionP7_eqA(el,h,ht){//v1.5byPVII-www.projectseven.com
varsp=10,inc=10,nh=h,g=document.getElementById(el),oh=g.offsetHeight,ch=parseInt(g.style.height);
ch=(ch)?ch:h;varad=oh-ch,adT=ht-ad;nh+=inc;nh=(nh>adT)?adT:nh;g.style.height=nh+'px';
oh=g.offsetHeight;if(oh>ht){nh=(ht-(oh-ht));g.style.height=nh+'px';}
if(nh
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]