代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>错新站长站 选项卡效果 www.Vevb.com</title>
<script type="text/javascript">
/*
选项卡封装
by 井底的蛙
2008-2-4
*/
opCard = function()
{
this.bind = new Array();
this.index = 0; //默认显示哪个选项卡,从0开始
this.style = new Array(); //["","",""]
this.overStyle = false; //选项是否有over, out变换样式事件,样式为this.style[2]
this.overChange = false; //内容是否用over, out直接激活
this.menu = false; //菜单类型
this.nesting = [false,false,"",""]; //是否嵌套,后面2个参数是指定menu,info的子集深度所用id
this.auto = [false, 1000]; //自动滚动[true,2000]
this.timerID = null; //自动播放的
this.menutimerID = null; //菜单延时的
this.creat = function(func)
{
var _arrMenu = document.getElementById(this.bind[0]).getElementsByTagName(this.bind[1]);
var _arrInfo = document.getElementById(this.bind[2]).getElementsByTagName(this.bind[3]);
var my = this, i;
var argLen = arguments.length;
var arrM = new Array();
if(this.nesting[0] || this.nesting[1]) // 有选项卡嵌套
{ // 过滤出需要的数据
var arrMenu = this.nesting[0]?getChilds(_arrMenu,this.bind[0],2):_arrMenu;
新闻热点
疑难解答
图片精选