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技術類

          主站蜘蛛池模板: 屏东县| 西乡县| 舟曲县| 玛纳斯县| 东海县| 崇义县| 潞西市| 任丘市| 江山市| 监利县| 祁阳县| 南岸区| 阳朔县| 荔波县| 亚东县| 丰都县| 大关县| 华容县| 泰和县| 阜城县| 潼关县| 株洲县| 平顺县| 五家渠市| 乃东县| 富阳市| 澎湖县| 阳信县| 和静县| 梅河口市| 历史| 齐齐哈尔市| 婺源县| 延川县| 怀柔区| 繁峙县| 文水县| 桐庐县| 方正县| 松原市| 扎兰屯市|