滑动展开_收缩广告代码
代码:[code]<!doctype html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 8k%oo#}1o o y<html xmlns="http://www.w3.org/1999/xhtml" lang="gb2312"> Fh{Wt
<head>
<title> 代码实例:滑动展开/收缩广告 </title> 5}'O{d_
<meta http-equiv="content-type" content="text/html; charset=gb2312" /> n@o?(U1w ZdH
<meta name="author" content="jz123cn@126.com"> 1C vCw7W/F
<meta name="keywords" content="代码实例:滑动展开/收缩广告" />
<script type="text/javascript">
var intervalId = null;
function slideAd(id,nStayTime,sState,nMaxHth,nMinHth){ (p9{r&{[5IM
this.stayTime=nStayTime*1000 || 3000;
this.maxHeigth=nMaxHth || 90; :P4f:@JjS
this.minHeigth=nMinHth || 1;
this.state=sState || "down" ;
var obj = document.getElementById(id);
if(intervalId != null)window.clearInterval(intervalId); FO6n#W*k
function openBox(){ Yv z/?,Ju]:V M
var h = obj.offsetHeight;
obj.style.height = ((this.state == "down") ? (h + 2) : (h - 2))+"px";
if(obj.offsetHeight>this.maxHeigth){