亚洲精品在线视频观看,亚洲av片不卡无码久久,777亚洲精品乱码久久久久久http://www.tkk7.com/gen-sky/category/40615.html終日昏昏醉夢間,忽聞春盡強登山, 因過竹院逢僧話,偷得浮生半日閑。zh-cnMon, 16 Nov 2009 04:40:37 GMTMon, 16 Nov 2009 04:40:37 GMT60web fx xload tree bughttp://www.tkk7.com/gen-sky/articles/webfx.html星期五星期五Wed, 11 Nov 2009 09:58:00 GMThttp://www.tkk7.com/gen-sky/articles/webfx.htmlhttp://www.tkk7.com/gen-sky/comments/301992.htmlhttp://www.tkk7.com/gen-sky/articles/webfx.html#Feedback0http://www.tkk7.com/gen-sky/comments/commentRss/301992.htmlhttp://www.tkk7.com/gen-sky/services/trackbacks/301992.html
樹寫得不錯,但是樹有二個 bug.

第一:
    獲得焦點問題,當我們點擊樹節點時會獲得焦點,然后將這個焦點存儲到全局對象中。當點擊另一個焦點時,它先判斷全局對象這個焦點是否存在,如果存在,則將焦點釋放,然后將點擊的焦點再次存儲到全局對象中。整個邏輯是對的,但是在IE下,有時候會出現多個焦點情況,可以肯定的說,這不是樹的 bug ,是 IE 對內存對象管理的 bug.

第二:
  
<?xml version="1.0"?>

<tree>
    
<tree text="Load &quot;tree1.xml&quot;" src="tree1.xml" />
    
<tree text="Loaded Item 1" action="http://webfx.eae.net" />
    
<tree text="Loaded Item 2">
        
<tree text="Loaded Item 2.1" action="javascript:alert(2.1)" />
    
</tree>
    
<tree text="Loaded Item 3 (with target)" action="http://www.google.com" target="_new" />
    
<tree text="Load &quot;tree1.xml&quot;">
        
<tree text="Load &quot;tree1.xml&quot;">
        
</tree>
    
</tree>
</tree>
直接解析這段 xml 文檔,就會發現,最后節點打開后,子節點前面不是空白圖片。



星期五 2009-11-11 17:58 發表評論
]]>
xloadtree.js http://www.tkk7.com/gen-sky/articles/286211.html星期五星期五Fri, 10 Jul 2009 03:39:00 GMThttp://www.tkk7.com/gen-sky/articles/286211.htmlhttp://www.tkk7.com/gen-sky/comments/286211.htmlhttp://www.tkk7.com/gen-sky/articles/286211.html#Feedback0http://www.tkk7.com/gen-sky/comments/commentRss/286211.htmlhttp://www.tkk7.com/gen-sky/services/trackbacks/286211.html  1 /*---------------------------------------------------------------------------...  閱讀全文

星期五 2009-07-10 11:39 發表評論
]]>
xtree.js http://www.tkk7.com/gen-sky/articles/286010.html星期五星期五Thu, 09 Jul 2009 01:44:00 GMThttp://www.tkk7.com/gen-sky/articles/286010.htmlhttp://www.tkk7.com/gen-sky/comments/286010.htmlhttp://www.tkk7.com/gen-sky/articles/286010.html#Feedback0http://www.tkk7.com/gen-sky/comments/commentRss/286010.htmlhttp://www.tkk7.com/gen-sky/services/trackbacks/286010.html  1    2 /*------------------------------------------------------...  閱讀全文

星期五 2009-07-09 09:44 發表評論
]]>
Web FX 的 XLoadTree 基本應用http://www.tkk7.com/gen-sky/articles/285356.html星期五星期五Fri, 03 Jul 2009 07:11:00 GMThttp://www.tkk7.com/gen-sky/articles/285356.htmlhttp://www.tkk7.com/gen-sky/comments/285356.htmlhttp://www.tkk7.com/gen-sky/articles/285356.html#Feedback0http://www.tkk7.com/gen-sky/comments/commentRss/285356.htmlhttp://www.tkk7.com/gen-sky/services/trackbacks/285356.html   usage(用法):
   
1 var tree = new WebFXTree("Root");
2 tree.add(new WebFXTreeItem("Tree Item 1"));
3 tree.add(new WebFXLoadTreeItem("Tree Item 2""tree.xml"));
4 tree.add(new WebFXTreeItem("Tree Item 3"));
5 document.write(tree);
6 
上面代碼顯示這樣:當樹項目擴大tree.xml 加載,并在加載虛擬樹頂目插入表明subcontent載入.

XML 格式:
 1 <?xml version="1.0"?>
 2 
 3 <tree>
 4    <tree text="Loaded Item 1" action="href://webfx.eae.net" />
 5    <tree text="Loaded Item 2">
 6       <tree text="Loaded Item 2.1" action="javascript:alert(2.1)" />
 7       <tree text="Load &quot;tree1.xml&quot;" src="tree1.xml" />
 8    </tree>
 9    <tree text="Loaded Item 3" />
10 </tree>
11 



API
WebFXLoadTree
      這個對象類型用來創建實際樹根,可用于填充樹與樹項目中從一個xml文件。該 WebFXLoadTree 繼承自WebFXTree, WebFXTree 提供了所有的屬性和方法。
  Constructor(構造)



new WebFXLoadTree(sText, sXmlSrc, sAction, sBehavior, sIcon, sOpenIcon)
Name                        description
xText                    文字標簽樹根。
xXmlSrc                  XML文件加載的來源。
sAction                  任擇,The action (uri) associated with the tree root.
sBehavior                 默認值設為:explorer 。
sIcon                      任擇,此項目圖象,如果文件夾關閉,顯示此圖象。
sPenIcon                 任擇,項目被打開時,顯示此圖象。

properties 屬性:
   所有屬性來自 WebFXTree
name                             description
src                                XML文件的來源。注意,這是只讀的XML文件,是唯一有效的裝載前的第一個文件。
loading           只讀。布爾類型,如果是真,表示XML文件已經開始裝載和尚未完成。
loaded                        只讀,布爾類型,如果是真,表示XML文件已經裝載完成。
errorText                    只讀字符串。如果載入中顯示失敗的原因。如果沒有錯誤,則返回空字符串。

WebFXLoadTreeItem
   這個對象類型用來創建樹項目,可以添加到樹根,或其他樹木的項目創建子文件夾樹中。當WebFXLoadTreeItem擴大XML
文件被加載,然后用來填充項目與子項目。
該WebFXLoadTreeItem 繼承自WebFXTreeItem,WebFXTreeItem提供了所有可用的屬性和方法。

Constructor  構造
    new WebFXLoadTreeItem(sText, sXmlSrc, sAction, eParent, sIcon, sOpenIcon)
    
    name          description
    sText                    文字標答樹項目。
    sXmlSrc                xml文件的消息來源。
    sAction                任擇,The action (uri) associated with the tree item.
    eParent                任擇,父級的 WebFXTreeItem 或 WebFXTree ,該項目可以增加。
    sIcon         任擇,此項目圖象,文件夾關閉時,顯示此圖象。
    sOpenIcon            任擇,此項目打開時,顯示本圖象。
    
    properties
    所有屬性來自 WebFXTreeItem
    name         description
    src          XML文件的消息來源。只讀的XML文件,是唯一有效的裝載前的第一個文件。
    loading             只讀,布爾型,如果是真,表示XML文件已經開始裝載并且尚未完成。
    loaded             只讀,布爾型,如果是真,表示XML文件已經裝載完成。
    errorText         只讀字符串,用于顯示失敗的原因,如果沒有錯誤,返回空字符串。
    
    XML格式
    唯一有效的組成部分,XML文件是tree項目,該 tree項目可以包含零,一個或多個tree項目。
    Attributes(屬性)
      有5個有效的屬性,你可以提供一個tree項目。
      name                description
      text                必需的,文字標簽樹項目。
      xmlSrc      任擇,xml 文件的消息來源。
      action      任擇,The action (uri) associated with the tree item.
      icon                任擇,項目圖象,如果文件夾收盤時,顯示本圖象。
      openIcon        任擇,用于項目打開時的圖象。僅公用于項目文件夾的 打開/擴大。
      
      DTD
        XML文件的類型定義。
        <!ELEMENT tree (tree*)>
        <!ATTLIST tree
                  text      CDATA   #REQUIRED
                  src       CDATA   #IMPLIED
                  action    CDATA   #IMPLIED
                  icon      CDATA   #IMPLIED
                  openIcon  CDATA   #IMPLIED>
            
        以下是一個tree.dtd.xml文件。
        <?xml version="1.0"?>
        
        <!DOCTYPE tree SYSTEM "tree.dtd">
        <tree>
            <tree text="Loaded Item 1" action="href://webfx.eae.net" />
            <tree text="Loaded Item 2">
                <tree text="Loaded Item 2.1" action="javascript:alert(2.1)" />
            </tree>
            <tree text="Load &quot;tree1.xml&quot;" src="tree1.xml" />
        </tree>


星期五 2009-07-03 15:11 發表評論
]]>
WebFX 的 Xml Extras 基本應用 http://www.tkk7.com/gen-sky/articles/285333.html星期五星期五Fri, 03 Jul 2009 05:44:00 GMThttp://www.tkk7.com/gen-sky/articles/285333.htmlhttp://www.tkk7.com/gen-sky/comments/285333.htmlhttp://www.tkk7.com/gen-sky/articles/285333.html#Feedback0http://www.tkk7.com/gen-sky/comments/commentRss/285333.htmlhttp://www.tkk7.com/gen-sky/services/trackbacks/285333.html閱讀全文

星期五 2009-07-03 13:44 發表評論
]]>
WebFx的 XTree 基本應用http://www.tkk7.com/gen-sky/articles/285309.html星期五星期五Fri, 03 Jul 2009 03:24:00 GMThttp://www.tkk7.com/gen-sky/articles/285309.htmlhttp://www.tkk7.com/gen-sky/comments/285309.htmlhttp://www.tkk7.com/gen-sky/articles/285309.html#Feedback0http://www.tkk7.com/gen-sky/comments/commentRss/285309.htmlhttp://www.tkk7.com/gen-sky/services/trackbacks/285309.html    轉自:http://webfx.eae.net/dhtml/xtree/xtree.html
文件: xtree.js

Usage(用法):

      
var tree = new WebFXTree('Root');
      tree.add(
new WebFXTreeItem('Tree Item 1'));
      tree.add(
new WebFXTreeItem('Tree Item 2'));
      tree.add(
new WebFXTreeItem('Tree Item 3'));
      document.write(tree);

Folders(可折疊的):
        
var tree = new WebFXTree('Root');
      
/* Add tree item to tree */
      tree.add(
new WebFXTreeItem('1'));
      
/* Create a new folder and add it to tree */
      
var folder = new WebFXTreeItem('2')
      tree.add(folder);
      
/* Add tree items to folder */
      folder.add(
new WebFXTreeItem('2.1'));
      folder.add(
new WebFXTreeItem('2.2'));
      folder.add(
new WebFXTreeItem('2.3'));
      
/* Add another tree item to tree */
      tree.add(
new WebFXTreeItem('3'));
      document.write(tree);

Explorer behavior (管理瀏覽器)
         
var tree = new WebFXTree('Root');
      
/* Change the behavior of the tree */
      tree.setBehavior('explorer');
      
/* Add tree item to tree */
      tree.add(
new WebFXTreeItem('1'));
      
/* Create a new folder and add it to tree */
      
var folder = new WebFXTreeItem('2')
      tree.add(folder);
      
/* Add tree items to folder */
      folder.add(
new WebFXTreeItem('2.1'));
      folder.add(
new WebFXTreeItem('2.2'));
      folder.add(
new WebFXTreeItem('2.3'));
      
/* Add another tree item to tree */
      tree.add(
new WebFXTreeItem('3'));
      document.write(tree);

Custom Icons(自定義圖標):
        
var tree = new WebFXTree('Root');
      tree.setBehavior('explorer');
      tree.icon 
= 'http://webfx.eae.net/images/notepad.gif';
      tree.add(new WebFXTreeItem('1'));
      
var folder = new WebFXTreeItem('2')
      tree.add(folder);
      
var t21 = new WebFXTreeItem('2.1');
      
/* Change the icon */
      t21.icon 
= webFXTreeConfig.fileIcon;
      folder.add(t21);
      
var t22 = new WebFXTreeItem('2.2');
      
/* Change the icon */
      t22.icon 
= webFXTreeConfig.fileIcon;
      folder.add(t22);
      
var t23 = new WebFXTreeItem('2.3');
      
/* Change the icon */
      t23.icon 
= webFXTreeConfig.fileIcon;
      folder.add(t23);
      tree.add(
new WebFXTreeItem('3'));
      document.write(tree);

xTree API

WebFXTreeAbstractNode 
    WebFXTree和WebFXTreeItem 的Abstract Object 、common 
function and methods 都是從這個
對象繼承來的。
    Construtcto(構造)
    抽象對象,沒有實例應該建立。
    Properties( 屬性)
    名字                                    類型                             描述
     id(編號)                        Number                         只讀屬性,可以用來找相關 HTMLElement。
                                                                                      如果您知道id HTMLElement,你可以在webFXTreeHandler.all中尋找
                                                                                      JS  Object
     text(文字)                        String                         The text lable 
for the node.
     action(uri)                    String                         The action (uri) associated 
with the node.
     open (打開)                Boolean                      只讀,布爾屬性,它告訴節點是張開(expanded) 或者
                                                                                      關閉(collapsed).(如果沒有子節點,將始終返回 
false)
     icon (圖標)                    String                          Image File to use as icon,Uses 
default if not specified.
     openIcon(打開圖標)   String                         Image File to use as the open icon(
if child nodes only).
                                                                                      Uses 
default if not (指定)specified.
     parentNode                        Reference(參考)         A reference(提及) to the parent node.
     childNodes                     Array                             Connection(收集) of references(提及) to all child nodes;
     
        
        Methods (方法)
        name                              Returns                                     description
        
        add(oNode,          reference            增加了樹項目目前的項目。 這種方法有兩種說法,
        [bNoIdent])                                                                一是WebFXTreeItem對象添加第二個是一個可選的布爾值,如果指定,并設置為true將防止樹從執行Indent方
                                                                                            法自動一旦節點已添加。此參數沒有影響調用Add方法之前,樹呈現,但此標志設置增加節點時,
                                                                                            樹后,已變得將大大減少所需的時間來完成作業,這可能是非常有益的,同時增加了一個節點的時間,
                                                                                            但要求Indent方法是手動執行頂部最節點受影響的變化之后。歸來的參考補充節點。    
        indent()                        
void                                 (xtree1存在,xtree2不存在)    Redraws the traces between nodes and makes sure the tree is properly layed out.                        
        toggle()                        
void                                切換展開/拆疊
        expand()                        
void                                Expands the node
        collapse()                    
void                                Collapses the node
        expandAll()                    
void                                Expands the node and all its descendants
        collapseAll()              
void                                Collapses the node and all its descendants
        expandChildren()        
void                                Expands all the descendants of the node
        collapseChildren()  voie                            Collapse all the descendants of the node
        getNextSibling()      Reference                        Returns a reference to the next sibling. 
                                                                                        (返回元素后緊跟的元素,如果無此節點,則屬性返回null)
        getPreviousSibling()Reference           Returns a reference to the previous sibling.
                                                                                        (返回節點之前緊跟的同級節點)
        toString                     String                                 (stree1存在,stree2 不存在)
        
    
    
    
WebFXTree
            該WebFXTree對象是用來創建實際樹根,可后來被填入樹項目。所有屬性和方法從WebFXTreeAbstractNode繼承。                                                                                 
        Constructor
           
new WebFXTree([text], [action], [behavior])
            name       type     description
            text             String   任擇,文字標簽樹根。
            action     String   任擇,The action (uri) associated 
with the tree root.
            behavior   String   任擇, 名稱使用的方法,檢查 setBehavior() 方法的細節。
            icon       String   任擇, 圖像使用的圖標。
            openIcon   String   任擇, 開放圖標的圖橡。
    
        properties
        name               type          description
        rendered    Boolean   檢舉,指出任何或沒有樹已產生和提供。
        
        Methods
        name                                     Returns      description
        getSelected()                        Reference       如果有的話,返回選擇對象的id
        setBehavior(sBehavior)  
void                 集行為的樹。描述的行為時,使用開放圖標樹項目
        getBehavior()                        String             返回behavtion (經典或Explorer )是目前描述打開的文件夾的描寫。
        
        WebFXTreeItem 
            用于創建樹的項目,可以增加(uising 的 Add方法)的 WebTXTree 或另一個WebFXTreeItem 對象。所有屬性和方法從WebFXTreeAbstractNode繼承.
            Constructor
            
new WebFXTreeItem([text], [action], [parent], [icon], [openIcon])
            
            name                        type                                                description 
            text                        String                                            任擇,文字標簽樹項目
            action                     String                                             任擇,The action (uri) associated 
with the tree item.
            parent          Reference                                        任擇,父母樹項目。如果該項目提供然后將被作為一個孩子eParent
            icon                         String                                            任擇。Image to use as the icon.
            openIcon                String                                            任擇.    Image to use as the open icon.
            method
            
            name                     Returns                                            description
            getFirst()         Reference                                        返回提到的第一個孩了節點,如果有的話。
            getLast()             Reference                                        如果有的話,返回提到的最后一個子節點。













星期五 2009-07-03 11:24 發表評論
]]>
xtree的基本應用---入門級(轉)http://www.tkk7.com/gen-sky/articles/284967.html星期五星期五Wed, 01 Jul 2009 08:10:00 GMThttp://www.tkk7.com/gen-sky/articles/284967.htmlhttp://www.tkk7.com/gen-sky/comments/284967.htmlhttp://www.tkk7.com/gen-sky/articles/284967.html#Feedback0http://www.tkk7.com/gen-sky/comments/commentRss/284967.htmlhttp://www.tkk7.com/gen-sky/services/trackbacks/284967.html xtree的基本應用---入門級(轉)

由 于公司要求做一棵關于公司員工選擇的JS控件樹,以前我們一直使用的都是dTree,由于沒有采用AJAX,服務器在北京的話,使用起來超慢,于是上面要 求修改此樹,沒想到任務落到了我的頭上,沒辦法,硬著頭皮做吧。正在我想有什么辦法的時候,同事推介用用Xtree,于是我開始去學習這個東東,現在只能 是基本應用,也想共享一下自己的學習必得。

1、下載:http://webfx.eae.net/dhtml/xtree2b/,里面包括了API,和DEMO,都是E文的,不過很容易看懂的。也可以直接在此網站點擊相關DEMO看效果,很不錯的。

2、就是使用了:可以直接打開下載解壓后的文件中的相關DEMO看看效果。不過要注意,因為Xtree使用了AJAX,也使用到了XML,不知道什 么原因,在 IE里本地打開動態加載的樹時會報JS錯誤,也不能正常打開樹(通過服務器器不會出錯),在FireFox中就能本地正常打開。

3、建立自己的樹:Xtree有兩種樹,一種是靜態樹,一種是動態樹。也可以將這兩種樹綜合在一起使用。

大家要去參考一下網上的“分析xloadtree, 用ajax實現的動態目錄樹 ”這篇文章,寫得不錯。

(1)、靜態樹:
<html>
<head>
<title>測試樹</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link type="text/css" rel="stylesheet" href="css/xtree2.css">
<script type="text/javascript" src="js/xtree2.js"></script>
</head>
<body>
<script type="text/javascript">
var tree = new WebFXTree("測試樹");//構造一棵樹
for (var i = 0; i < 50; i++){
tree.add( new WebFXTreeItem("子結點 " + i) );//加入結點
}
tree.write();//輸入樹
</script>
<body>
</html>

(2)、動態樹
var tree = new WebFXLoadTree("Hello World", "tree.xml");//打開根結點時,即從tree.xml文件中得到子樹,也可是從服務器返回的XML流
tree.write();

(3)、兩種樹綜合(從XML文件中讀到子樹結點):
var tree = new WebFXTree("Root");
tree.add(new WebFXTreeItem("Tree Item 1"));

//從tree.xml文件中動態加載子樹,此處的XML文件可以是從服務器方返回來的XML流,
//如:tree.add(new WebFXLoadTreeItem("從服務器返回", "tree.jsp"));
tree.add(new WebFXLoadTreeItem("Tree Item 2", "tree.xml"));

tree.add(new WebFXTreeItem("Tree Item 4"));
tree.write();

tree.jsp文件如下:
<%@ page language="java" contentType="text/xml; charset=UTF-8" pageEncoding="UTF-8" %>
<%
        response.setContentType("text/xml"); //這句必須要,只有設置了才是能XML流形式輸出到客戶端
        out.println("<tree>");
        out.println("<tree text=""Load tree.xml"" src=""         out.println("</tree>");
%>

4、tree.xml說明:
在動態生成一棵樹時就會用到tree.xml文件,它是一個標準的XML文件。
它由一個外層的tree無屬性元素,再內部包括多個子tree元素組成。

使用要注意的是:
如果要使用到中文或漢字的話,最好在文件開始處加入<?xml version="1.0" encoding="gb2312"?>否則會報亂碼的JS錯誤。
另外就是XML文件中的特殊字符處理,這是使用這個很傷腦殼的地方,大家可以查考xtree所附帶的TREE.XML文件,講得很清楚。
<?xml version="1.0" encoding="gb2312"?>
<tree>
<tree text="Load &quot;tree1.xml&quot; (Should raise error)" src="tree1.xml" toolTip="Tool Tip"/>
<tree text="Load &quot;tree2.xml&quot; (Should raise error)" src="tree2.xml"
    onerror="this.setText('Load &quot;tree2.xml&quot; (Raised error)')"/>
<tree text="Loaded Item 1" action="
<tree text="Loaded Item 2" expanded="true">
   <tree text="Loaded Item 2.1" action="javascript:alert( tree.getSelected().getId() )" id="custom-id"/>
</tree>
<tree text="Loaded Item 3 (click to set src)" onaction="this.setSrc(this.getSrc() ? null : 'tree3.xml')"
    onload="this.setText('Loaded Item 3 (changed onload)')"/>
<tree text="Load treeLARGE.xml" src="treeLARGE.xml" toolTip="XML file with 500 items"/>
<tree text="Deep nesting" src="nest.xml.pl" />
</tree>

其實xtree還提供了兩個JS文件:xtree2.js,xloadtree2.js,里面包括了xtree的工作原理和相關方法及屬性,
沒事大家可以去看看,對操作樹很有用處的,如:選擇/得到指定結點的信息,得到/修改結點的圖標等等。

我在使用時由于TOMCAT設置成不允許客戶端緩存,感覺樹大了就有點點慢,所以建議大家使用時允許客戶端緩存,會快很多。



星期五 2009-07-01 16:10 發表評論
]]>
主站蜘蛛池模板: 1000部夫妻午夜免费| 久久久久亚洲精品美女| 真人做人试看60分钟免费视频| 又长又大又粗又硬3p免费视频| 亚洲最大的成人网| 666精品国产精品亚洲| 亚洲综合无码精品一区二区三区| 国产精品成人四虎免费视频| 国产h肉在线视频免费观看| 两个人看www免费视频| 日亚毛片免费乱码不卡一区 | 亚洲欧美aⅴ在线资源| 久久精品国产亚洲av日韩| 亚洲香蕉成人AV网站在线观看 | 亚洲冬月枫中文字幕在线看| 亚洲AV无码日韩AV无码导航| 久久亚洲高清综合| 国产一区二区免费在线| 在线观看免费污视频| 久草在视频免费福利| 国产精品怡红院永久免费| 蜜臀98精品国产免费观看| 免费日本一区二区| 日韩免费高清播放器| 国产一级一毛免费黄片| 国产日韩AV免费无码一区二区三区 | 亚洲一卡2卡3卡4卡国产网站| 亚洲精品高清国产一久久| 国产亚洲一区二区手机在线观看| 亚洲中文无韩国r级电影| 亚洲福利精品电影在线观看| 亚洲国产电影av在线网址| 日韩亚洲精品福利| 亚洲av成人一区二区三区在线观看| 国产婷婷高清在线观看免费| 国产gav成人免费播放视频| 国产男女猛烈无遮挡免费网站| 国产又大又粗又硬又长免费| 国产日产成人免费视频在线观看| 国产猛烈高潮尖叫视频免费 | 亚洲国产日韩a在线播放|