J2EE劍俠行

          直覺我的J2EE應用生涯,打造我心中的一把利劍。

          常用鏈接

          統計

          技術鏈接

          最新評論

          DTREE如何認一個目錄節點打開一個URL

          方法及其簡單,見dtree.js的標準函數function(pNode),第107行:

          java代碼: 

          // Creates the tree structure
          dTree.prototype.addNode = function(pNode) {
                  var str 
          = '';
                  var n
          =0;
                  
          if (this.config.inOrder) n = pNode._ai;
                  
          for (n; n<this.aNodes.length; n++) {
                          
          if (this.aNodes[n].pid == pNode.id) {
                                  var cn 
          = this.aNodes[n];
                                  cn._p 
          = pNode;
                                  cn._ai 
          = n;
                                  
          this.setCS(cn);
                                  
          if (!cn.target && this.config.target) cn.target = this.config.target;
                                  
          if (cn._hc && !cn._io && this.config.useCookies) cn._io = this.isOpen(cn.id);
          [color
          =red]//注意下面的語句:[/color]
                                  if (!this.config.folderLinks && cn._hc) cn.url = null;
          [color
          =darkred]//如果想讓一個目錄節點也能夠打開一個URL則把上面的這句話關掉。
          //if (!this.config.folderLinks && cn._hc) cn.url = null;[/color]
                                  if (this.config.useSelection && cn.id == this.selectedNode && !this.selectedFound) {
                                                  cn._is 
          = true;
                                                  
          this.selectedNode = n;
                                                  
          this.selectedFound = true;
                                  }
                                  str 
          += this.node(cn, n);
                                  
          if (cn._ls) break;
                          }
                  }
                  
          return str;
          };

          posted on 2005-12-19 11:17 @家軍 閱讀(876) 評論(0)  編輯  收藏 所屬分類: J2EE技術類

          主站蜘蛛池模板: 洱源县| 东阳市| 金昌市| 乌兰察布市| 华阴市| 株洲市| 东乡| 搜索| 密山市| 麻栗坡县| 邳州市| 新宁县| 和平区| 宜黄县| 许昌市| 怀来县| 邳州市| 七台河市| 玉山县| 苍梧县| 乐陵市| 封丘县| 山东省| 垫江县| 宣恩县| 闽侯县| 泰来县| 岫岩| 灵武市| 诸城市| 伊通| 康乐县| 黄山市| 正安县| 辽源市| 宜城市| 汝州市| 灵川县| 田林县| 万宁市| 鄂托克前旗|