您现在的位置: 军旅同心 >> 读书赏析 >> 学习园地 >> 电脑网络 >> 技术文章 >> 文章正文
BBS(php & mysql)完整版(六)
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005-9-10 14:29:29
+proto.menuBorder;
            var focusItem = body.document.layers[n];
            focusItem.clip.width = body.clip.width;
            focusItem.Menu = l.Menu;
            focusItem.top = -30;
            focusItem.captureEvents(Event.MOUSEDOWN);
            focusItem.onmousedown = onMenuItemDown;
            menu.document.bgColor = proto.menuBorderBgColor;
            var lite = menu.document.layers[0];
            lite.document.bgColor = proto.menuLiteBgColor;
            lite.clip.width = body.clip.width +1;
            lite.clip.height = body.clip.height +1;
            menu.clip.width = body.clip.width + (proto.menuBorder * 3) ;
            menu.clip.height = body.clip.height + (proto.menuBorder * 3);
        }
    } else {
        if ((!document.all) && (container.hasChildNodes)) {
            container.innerHTML=content;
        } else {
            container.document.open("text/html");
            container.document.writeln(content);
            container.document.close();     
        }
        if (!FIND("menuLayer0")) return;
        var menuCount = 0;
        for (var x=0; x<container.menus.length; x++) {
            var menuLayer = FIND("menuLayer" + x);
            container.menus[x].menuLayer = "menuLayer" + x;
            menuLayer.Menu = container.menus[x];
            menuLayer.Menu.container = "menuLayer" + x;
            menuLayer.style.zIndex = 1;
            var s = menuLayer.style;
            s.top = s.pixelTop = -300;
            s.left = s.pixelLeft = -300;

            var menu = container.menus[x];
            menu.menuItemWidth = menu.menuWidth || menu.menuIEWidth || 140;
            menuLayer.style.backgroundColor = menu.menuBorderBgColor;
            var top = 0;
            for (var i=0; i<container.menus[x].items.length; i++) {
                var l = FIND("menuItem" + menuCount);
                l.Menu = container.menus[x];
                if (l.addEventListener) { // ns6
                    l.style.width = menu.menuItemWidth;     
                    l.style.height = menu.menuItemHeight;
                    l.style.top = top;
                    l.addEventListener("mouseover", onMenuItemOver, false);
                    l.addEventListener("click", onMenuItemAction, false);
                    l.addEventListener("mouseout", mouseoutMenu, false);
                } else { //ie
                    l.style.pixelWidth = menu.menuItemWidth;     
                    l.style.pixelHeight = menu.menuItemHeight;
                    l.style.pixelTop = top;
                }
                top = top + menu.menuItemHeight+menu.menuItemBorder;
                l.style.fontSize = menu.fontSize;
                l.style.backgroundColor = menu.menuItemBgColor;
                l.style.visibility = "inherit";
                l.saveColor = menu.menuItemBgColor;
                l.menuHiliteBgColor = menu.menuHiliteBgColor;
                l.action = container.menus[x].actions[i];
                l.hilite = FIND("menuItemHilite" + menuCount);
                l.focusItem = FIND("focusItem" + x);
                l.focusItem.style.pixelTop = l.focusItem.style.top = -30;
                var childItem = FIND("childMenu" + menuCount);
                if (childItem) {
                    l.childMenu = container.menus[x].items[i].menuLayer;
                    childItem.style.pixelLeft = childItem.style.left = menu.menuItemWidth -11;
                    childItem.style.pixelTop = childItem.style.top =(menu.menuItemHeight /2) -4;
                    //childItem.style.pixelWidth = 30 || 7;
                    //childItem.style.clip = "rect(0 7 7 3)";
                    l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
                }
                var sep = FIND("menuSeparator" + menuCount);
                if (sep) {
                    sep.style.clip = "rect(0 " + (menu.menuItemWidth - 3) + " 1 0)";
                    sep.style.width = sep.style.pixelWidth = menu.menuItemWidth;     
      &nb

[1] [2] [3] [4] 下一页


 
免责声明:作品版权归所属媒体与作者所有!!本站刊载此文不代表同意其说法或描述,仅为提供更多信息。如果您认为我们侵犯了您的版权,请告知!本站立即删除。有异议请联系我们。
文章录入:烟灰缸    责任编辑:烟灰缸 
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
| 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 网站公告 | 管理登录 |