<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆 - 154  文章 - 60  trackbacks - 0
    <2007年10月>
    30123456
    78910111213
    14151617181920
    21222324252627
    28293031123
    45678910

    聲明:

    該blog是為了收集資料,認(rèn)識(shí)朋友,學(xué)習(xí)、提高技術(shù),所以本blog的內(nèi)容除非聲明,否則一律為轉(zhuǎn)載?。?br />
    感謝那些公開(kāi)自己技術(shù)成果的高人們?。?!

    支持開(kāi)源,尊重他人的勞動(dòng)??!

    常用鏈接

    留言簿(3)

    隨筆分類(lèi)(148)

    隨筆檔案(143)

    收藏夾(2)

    其他

    學(xué)習(xí)(技術(shù))

    觀察思考(非技術(shù))

    搜索

    •  

    最新評(píng)論

    閱讀排行榜

    評(píng)論排行榜

    <button onclick=s.moveNext()>next</button><button onclick=s.movePre()>pre</button><button onclick=s.reLoad()>reload</button>
    <script>
    function eyunTree(Tname)
      {if(typeof(Tname) != "string" || Tname == "")
         throw(new Error(-1, '創(chuàng)建類(lèi)實(shí)例的時(shí)候請(qǐng)把類(lèi)實(shí)例的引用變量名傳遞進(jìn)來(lái)!'));
       this.O=null;
       this.tree="";
       this.nodes=new Array();
       this.header="<table border='0'  height='20' cellspacing='0' cellpadding='1'>\r\n";
       this.footer="</table>\r\n";
       this.style= "<style type='text/css'>\r\n";
       this.style+="  td{white-space: nowrap;font:9pt/150% '宋體';}\r\n";
       this.style+="  .on{cursor:hand;background-color:#B5BED6;border:1px solid #08246B;}\r\n";
       this.style+="  .click{cursor:hand;background-color:#FFFFFF;border:1px solid #B5BED6;}\r\n";
       this.style+="</style>";
       this.addNode=function (parent,text,hasChild,href,target)
                      {if(hasChild!=1 && arguments.length!=5)
                         throw(new Error(-2, '參數(shù)錯(cuò)誤!'));
                       var nodeHeader="  <tr style='display:none'>\r\n    <td><table style='margin-left:15' border='0'  height='20' cellspacing='0' cellpadding='1'>\r\n";
                       var nodeFooter="</table></td>\r\n  </tr>\r\n";
                       var treeHead="  <tr>\r\n";
                       treeHead+=   "    <td><span onclick='"+Tname+".nodeClick(this)' onmouseout='"+Tname+".nodeOut(this)' onmouseover='"+Tname+".nodeOver(this)'";
                       var treeFoot="</span></td>\r\n";
                       treeFoot+=   "  </tr>\r\n";
                       var treeNode=treeHead+"hasChild='"+hasChild+"'";
                       if(hasChild!=1)
                         {treeNode+=" href='"+href+"' target='"+target+"'";
                          var src="comm/img/tree/leaf.gif";
                         }
                       else
                         var src="comm/img/tree/shrink.gif"
                       treeNode+="><img src='"+src+"' align='absmiddle'>"+text+treeFoot;
                       if(parent=="root")
                          treeNode=this.header+treeNode;
                       if(hasChild==1)
                         {treeNode+=nodeHeader;
                         }
                       if(this.tree!="" && this.nodes.length!=0)
                         {if(parent=="root")
                            {while(this.nodes.length>0)
                               {this.tree+=nodeFooter;this.nodes.length--}
                             this.tree+=this.footer;
                            }
                          else
                            {if(this.nodes[this.nodes.length-1]!=parent && this.tree.lastIndexOf(parent)!=this.tree.length-parent.length)
                               {while(this.nodes.length-1>0)
                                 {if(this.nodes[this.nodes.length-1]!=parent)
                                    this.tree+=nodeFooter;
                                  else
                                    break;
                                  this.nodes.length--
                                 }                             
                               }
                             }
                         }
                       if(this.nodes[this.nodes.length-1]!=parent)
                         this.nodes[this.nodes.length]=parent;
                       this.tree+=treeNode;
                       return treeNode;
                      }
        this.nodeOver=function (o)
                      {o.oldClass=o.className;
                       o.className="on";
                      }
        this.nodeOut=function (o)
                       {o.className=o.oldClass;
                       }
        this.nodeClick=function (o)
                         {if(o.hasChild=="1")
                            {if(o.type=="open")
                               this.treeClose(o);
                             else
                               this.treeOpen(o);
                            }
                          else
                            {tmpA.href=typeof o.href=="undefined"?"#":o.href;
                             tmpA.target=typeof o.target=="undefined"?"_self":o.target;
                             tmpA.click();
                            }
                          if(this.O!=null)
                            this.O.className=this.O.oldClass="";
                          this.O=o;
                          o.oldClass=o.className="click";
                         }
        this.treeClose=function (o)
                         {o=o.parentElement.parentElement;
                          o.nextSibling.style.display="none";
                          o.firstChild.firstChild.firstChild.src="comm/img/tree/shrink.gif";
                          o.firstChild.firstChild.type="close";
                         }

        this.treeOpen=function (o)
                        {o=o.parentElement.parentElement;
                         o.nextSibling.style.display="";s
                         o.firstChild.firstChild.firstChild.src="comm/img/tree/unwrap.gif";
                         o.firstChild.firstChild.type="open";
                        }
        this.moveNext=function ()
                        {var o=document.getElementsByTagName("SPAN");
                         var l=o.length;
                         if(this.O==null)
                           {o[0].click(o[0]);  
                            return true;
                           }
                         for(var i=0;i<l;i++)
                           if(o[i].className==this.O.className)
                             break;
                        if(i<l-1)
                          o[i+1].click(o[i+1]);
                        else
                          o[i].click(o[i]);
                        }
        this.movePre=function ()
                       {var o=document.getElementsByTagName("SPAN");
                        var l=o.length;
                        if(this.O==null)
                          {o[0].click(o[0]);  
                           return true;
                          }
                        for(var i=0;i<l;i++)
                          if(o[i].className==this.O.className)
                            break;
                        if(i<l && i>0)
                          {var oP=o[i-1].parentElement;
                           var oC=null;
                           while(oP!=document.body)
                             {if(oP.tagName=="TR" && oP.style.display=="none")
                                {oP.style.display="";
                                 oP.previousSibling.firstChild.firstChild.firstChild.src="comm/img/tree/unwrap.gif";
                                 oP.previousSibling.firstChild.firstChild.type="open";
                                }
                              oP=oP.parentElement;
                             }
                           o[i-1].click(o[i-1]);
                          }
                        else
                          o[0].click(o[0]);
                       }
        this.reLoad=function ()
                      {var o=document.getElementsByTagName("SPAN");
                       var l=o.length;
                       if(this.O==null)
                         {o[0].click(o[0]);  
                          return true;
                         }
                       for(var i=0;i<l;i++)
                         if(o[i].className==this.O.className)
                           break;
                       if(i<l)
                         o[i].click(o[i]);
                       else
                         o[0].click(o[0]);
                      }
        this.show=function ()
                    {document.writeln(this.style);
                     document.writeln(this.tree);
                     document.writeln("<a id='tmpA'></a>");
                    }
       }
      var s=new eyunTree("s")
      var n=s.addNode("root","testRoot1",1)
      var a=s.addNode(n,"testNode1",1)
      s.addNode(a,"testNodeChild1",0,"http://www.iecn.net","_blank")
      s.addNode(a,"testNodeChild2",0,"http://www.iecn.net","_blank")
      var t=s.addNode(a,"testNodeChildNode1",1)
      s.addNode(t,"testNodeChild1",0,"http://www.iecn.net","_blank")
      s.addNode(t,"testNodeChild2",0,"http://www.iecn.net","_blank")
      s.addNode(n,"testChild2",0,"http://www.iecn.net","_blank")
      s.addNode(n,"testChild3",0,"http://www.chinaddv.com","_blank")
      var o=s.addNode("root","testRoot2",1)
      s.addNode(o,"testChild1",0,"http://www.chinaddv.com","_blank")
      d=s.addNode(o,"testChild2",1)
      s.addNode(d,"testChild1",0,"http://www.chinaddv.com","_blank")
      e=s.addNode(d,"testChild1",1)
      s.addNode(e,"testChild1",0,"http://www.chinaddv.com","_blank")
      s.addNode(e,"testChild1",0,"http://www.chinaddv.com","_blank")
      s.addNode(e,"testChild1",0,"http://www.chinaddv.com","_blank")
      s.addNode(d,"testChild1",0,"http://www.chinaddv.com","_blank")
      s.addNode(o,"testChild3",0,"http://www.chinaddv.com","_blank")
      s.show();
    </script>

    posted on 2007-10-09 09:53 lk 閱讀(2472) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): ajax&js
    主站蜘蛛池模板: 国产18禁黄网站免费观看| 亚洲视频欧洲视频| 精品熟女少妇AV免费观看| 免费国产污网站在线观看| 亚洲av日韩综合一区久热| 亚洲黄网在线观看| 久久亚洲国产中v天仙www| 又黄又爽一线毛片免费观看| 久久笫一福利免费导航| 久久青草国产免费观看| 中文字幕免费播放| 免费国产草莓视频在线观看黄| 国产亚洲玖玖玖在线观看| 久久精品a亚洲国产v高清不卡| 亚洲熟女一区二区三区| 免费永久看黄在线观看app| 免费在线观看的网站| 99视频在线精品免费| 国色精品va在线观看免费视频| 一级A毛片免费观看久久精品| 亚洲欧美成aⅴ人在线观看| 亚洲AV无码一区二区三区在线| 亚洲自偷自偷精品| 亚洲丁香色婷婷综合欲色啪| 亚洲国产精品国自产拍AV| 国产亚洲成av人片在线观看| 亚洲一区无码中文字幕| 亚洲一区二区三区无码中文字幕| 亚洲国产成人久久一区久久| 免费一级成人毛片| 亚洲av成人一区二区三区在线观看| 国产男女猛烈无遮挡免费网站 | 免费看少妇作爱视频| 毛片a级毛片免费观看品善网 | 亚洲日本国产综合高清| 亚洲男人天堂2018av| 亚洲kkk4444在线观看| 亚洲欧美国产精品专区久久| 亚洲丁香婷婷综合久久| 久久亚洲欧美国产精品| 特级毛片全部免费播放a一级|