代碼如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>錯新站長站 選項卡效果 m.survivalescaperooms.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;
新聞熱點
疑難解答
圖片精選