有一面动画的,现在是按下 ww_down 或 ww_up 会收缩或展开,我现在想当鼠标放上去就实现效果,请问一下要修改那个地方
有样式 www.brightking.com
window.onresize = resetDIV;
function resetDIV()
{
with(document.getElementsByTagName("DIV")[0].style)
{
left = (document.body.offsetWidth-parseInt(width))/2 + 381 ;
}
xpd();
window.setTimeout("fod();",5000);
}
function getelt(element){
return element = document.getElementById(element);
}
function xpd(){
var d=getelt('class1content');
var h=d.offsetHeight;
var maxh=60;
function dmove(){
h+=30; //设置层展开的速度
if(h>=maxh){
d.style.height='60px';
clearInterval(iIntervalId);
}else{
d.style.display='block';
d.style.height=h+'px';
}
}
iIntervalId=setInterval(dmove,2);
}
function fod(){
var d=getelt('class1content');
var h=d.offsetHeight;
var maxh=60;
function dmove(){
h-=30;//设置层收缩的速度
if(h<=0){
d.style.display='none';
clearInterval(iIntervalId);
}else{
d.style.height=h+'px';
}
}
iIntervalId=setInterval(dmove,2);
}
function act(){
var d=getelt('class1content');
var sb=getelt('stateBut');
if(d.style.display=='none'){
xpd();
sb.innerHTML='<img src="images/ww_up.gif" border="0">';
}else{
fod();
sb.innerHTML='<img src="images/ww_down.gif" border="0">';
}
}