亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? 新建 文本文檔.txt

?? 是數據一次性加載
?? TXT
字號:
Introduction
I had a need to implement several different types of tree controls in ASP lately. I looked around, did not find exactly what I wanted. There was no short supply of tree type controls for DHTML - my problem was that most were really complex and tended to do way more than what I required. The other problem (that I had) was that some of the more simple ones took a lot of code on the ASP side for even a semi-simple looking tree.

I decided that I wanted a tree that could be built with a single server-side include, no components, and was reasonably fast. So here is my first version of a tree control usable in ASP.

I will state that originally I was working with an example I found somewhere (I honestly cannot remember where), all that is left from that example are some of the images for displaying the tree, and a couple of div names.

Background
All tree controls used in DHTML rely on JavaScript manipulating elements on the page. So (for example) if you have a DIV element and you give it an ID like:

<DIV id=myDIV style="DISPLAY: none"></DIV>
you can then manipulate the HTML element in client-side JavaScript like this:

<script language=javascript>
var oMyDiv = document.getElementById("myDIV");
// do something with it
oMyDiv.style.display= "none";
</script>
That was a really simple example - but it demonstrates exactly how trees and other DHTML widgets work. You can manipulate all the attributes and so forth on an element all in script.

In my tree control I use DIV's to encapsulate the different parts of the tree (each branch), then when you click to expand a branch, I change the DIV's style depending on whether I want to expand (show the child DIV), or collapse (hide the child DIV). You can look at the source to see how all the elements are manipulated to create the tree control - it really is all based on hiding/showing and changing a few attributes.

The real crux of spitting a tree control out from ASP (in my opinion) happens in the tree construction (ASP side of things). This part was where some of the ASP examples out there really were confusing. I had a hard time believing that 3 pages of code were necessary to render a tree. I am not saying my solution is the best - but it is rather short on the code needed to do it (which I am proud of).

There are a couple of assumptions about a tree that can be made without even knowing what is going to go into it.

All trees have branches and leaves 
A tree (when drawn) is drawn one line at a time 
Number 1 makes creating a little tree API pretty simple - you are either adding leaves or starting a new branch.

Number 2 is where we can do some optimizations in the code and take out most of the logic that would normally be needed to draw a tree. Instead of using a tree-structure to draw a tree, I only track what depth branch you are on (this will become clear in a minute).

A couple of other details are that I wanted to be able to add keys to each branch and item, I wanted to be able to select, multi-select and deselect. I also wanted to prevent having to code a whole bunch of JavaScript arrays to track items.

The solution for selection/de-selection/keys is to use a hidden SPAN element which will contain each items key (any value you want to give it), and its selection state. You are probably wondering where I am storing the selection state. I am taking advantage of the fact that these SPANs containing the item keys will never be visible - so I can stuff variables into the element's style attributes with no effect on the actual page display. I put a 0 or 1 into the zIndex attribute to tell the script whether the item is selected or not (thanks CSS!).

Last but not least, I added a custom JavaScript handler for dealing with item selections. The JavaScript prototype looks like this (we will see how to use it in a minute):

myCustomFunction(bReslect,bSelected,sKey);
bReselect is whether or not the item was just re-selected 
bSelected whether or not the item was selected 
sKey the items key (you assign this) 
Using the code
Let's get down to business and see how all this information fits together into something (hopefully) useful.

To even be able to create a tree using the scripts, you will need to include it between the <HEAD> tags of your ASP page.

<!--#INCLUDE FILE="include\i_treebuilder.asp" -->
Right after this line would be a good place to put your custom JavaScript function:

// define our item dispatch function 
myTreeItemDispatch(bReslect,bSelected,sKey)
{
   if(bSelected || bReslect)
   {
      alert("You clicked - " + sKey);
   }
}
// let tree lib know we want to use this
TreeItemDispatch = myTreeItemDispatch;
We are almost ready to spit out a tree. One thing that I added to my tree implementation was the ability to customize the icons of each node. For this to work efficiently, you register them using a number - before you start your tree. Here is an example (in ASP)

' register our branch and leaf type 

tree_RegisterBranchType 0,"images/tree/foldericon.gif" 

tree_RegisterLeafType 0,"images/tree/htmlicon.gif"
I set up the potential for 10 different types of each (probably overkill). If you want to add more - just change the numbers.

We are now ready to start our tree, the tree-top in my implementation is static (i.e.: it can not be collapsed). I did this because every tree I have to make only needs the top as a description of what's in the tree. So to kick off a tree we would have some ASP that looks like this:

tree_Start "Personal Folders","images/tree/openfoldericon.gif"
This tells the tree API to start building a tree with a top item named "Personal folders" and using the specified icon.

Now we are free to add branches and leaves to our tree - the only thing we really need to keep track of is, if we are adding the last item in a branch or the tree itself - another note is that I have defined a constant (for ASP use) called tTRUE and tFALSE, so when adding branches and leaves we use the constant for yes/no values. To add a branch we use the tree_StartBranch function. It takes several parameters - here is an example:

tree_StartBranch 0,tFALSE,"Test Folder","tst"
The first parameter is the branch type (which we registered above), the second parameter tells the tree if this is the last branch in the current branch (or tree), third is the caption, and the last parameter is a key you can assign to implement custom behavior on the client side.

Once we start a branch we can add leaves to it like this:

tree_AddLeaf 0,tFALSE, "Child 1","tst1"
The parameters are the same as those for tree_StartBranch with the exception that the first parameter is a leaf type (which we registered above).

Once you have added leaves to your branch you have to end it using the tree_EndBranch function.

Once you have added all the branches to a tree you call the tree_End function which writes the tree out.

The usage of the API lets you easily build up a tree using only a few functions. Look in the included example and you will see it is pretty straightforward.

Closing
What happens once someone clicks on an item, is for you to implement. I wanted this to be a good little framework for tree generation - I hope you find it useful.

If you use it in something interesting - let me know.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩午夜小视频| 成人精品免费视频| 一区二区三区欧美久久| 国产精品每日更新在线播放网址| 国产亚洲精品超碰| 久久久久99精品一区| 国产丝袜欧美中文另类| 中文字幕视频一区二区三区久| 国产精品三级电影| 亚洲人精品午夜| 亚洲精品欧美激情| 天天av天天翘天天综合网色鬼国产| 亚洲精品中文字幕在线观看| 亚洲一区二区精品视频| 免费看日韩精品| 国产精品69毛片高清亚洲| eeuss国产一区二区三区| 91小视频在线观看| 欧美日韩免费观看一区二区三区 | 国产91高潮流白浆在线麻豆 | 91网站在线播放| 欧美日韩专区在线| 欧美一级国产精品| 久久精品人人做人人爽人人| 中文字幕日韩欧美一区二区三区| 亚洲欧美日韩精品久久久久| 日本aⅴ精品一区二区三区| 国产精品1区2区| 欧洲av一区二区嗯嗯嗯啊| 日韩一区二区在线看片| 亚洲精品中文字幕在线观看| 蜜桃视频在线观看一区| 成人综合日日夜夜| 欧美一区二区三区在线| 欧美国产欧美综合| 日韩精品欧美成人高清一区二区| 国产精品99久久久久久宅男| 欧美日韩国产小视频| 亚洲国产高清在线| 日本中文一区二区三区| 97久久人人超碰| 日韩精品中文字幕一区二区三区| 最新日韩在线视频| 国产精品综合在线视频| 欧美一区在线视频| 亚洲天堂成人在线观看| 久久电影网站中文字幕| 日本高清视频一区二区| 中文字幕+乱码+中文字幕一区| 爽好久久久欧美精品| 色婷婷综合久久| 国产精品丝袜一区| 国产精品一区2区| 日韩欧美专区在线| 亚洲一区二区av在线| 97久久精品人人爽人人爽蜜臀| 久久这里只有精品视频网| 天堂精品中文字幕在线| 欧美日韩在线精品一区二区三区激情 | 极品少妇一区二区| 欧美一区午夜精品| 石原莉奈在线亚洲二区| 色美美综合视频| 亚洲乱码日产精品bd| av福利精品导航| 国产精品福利av| 99久久er热在这里只有精品15 | jlzzjlzz亚洲女人18| 国产亚洲成年网址在线观看| 久久99久久久欧美国产| 日韩限制级电影在线观看| 日日摸夜夜添夜夜添精品视频| 欧美系列亚洲系列| 一区二区三区欧美激情| 在线观看www91| 亚洲成人午夜影院| 欧美剧情片在线观看| 亚洲第一电影网| 91精品婷婷国产综合久久性色| 视频一区二区三区入口| 欧美一级免费观看| 精品一区二区三区在线观看国产 | 91美女片黄在线| 亚洲人成伊人成综合网小说| 久久这里只有精品视频网| 蜜桃视频一区二区三区| 26uuu色噜噜精品一区| 国产成人aaaa| 亚洲欧洲一区二区在线播放| 91精品1区2区| 日韩成人av影视| 精品美女一区二区| 成人午夜精品在线| 亚洲综合久久久久| 日韩午夜精品视频| 成人毛片老司机大片| 一区二区三区欧美在线观看| 3d成人动漫网站| 国产原创一区二区| 1024精品合集| 日韩视频一区在线观看| 丁香婷婷综合激情五月色| 亚洲男帅同性gay1069| 538在线一区二区精品国产| 国内精品伊人久久久久av影院 | 一本色道久久综合狠狠躁的推荐 | 亚洲亚洲精品在线观看| 日韩一区二区视频在线观看| 大胆亚洲人体视频| 午夜精品爽啪视频| 中文字幕精品—区二区四季| 欧洲亚洲精品在线| 国精产品一区一区三区mba视频| 亚洲精品欧美在线| 久久久一区二区| 欧美人妇做爰xxxⅹ性高电影| 国产一区二区三区综合| 亚洲成人在线网站| 最近日韩中文字幕| 久久综合九色综合欧美就去吻| 91国产免费看| 不卡视频在线看| 韩国女主播成人在线| 亚洲观看高清完整版在线观看| 欧美激情一区三区| 日韩欧美在线综合网| 欧美色图在线观看| 不卡的av中国片| 久久99久久99| 日韩va亚洲va欧美va久久| 亚洲欧美日韩中文播放 | 欧美日韩一本到| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 欧美成人一级视频| 欧美欧美午夜aⅴ在线观看| 91精品国产综合久久福利| av在线不卡电影| 国产成人激情av| 精品影视av免费| 日日欢夜夜爽一区| 亚洲一区二区三区中文字幕| 亚洲视频一二三| 亚洲欧美精品午睡沙发| 亚洲欧洲另类国产综合| 欧美国产欧美综合| 亚洲国产精品高清| 国产精品久久久久久亚洲毛片 | 99精品视频一区| 成人美女视频在线观看| 国产成人精品免费视频网站| 国产一区二区三区免费| 国产成人在线免费| 成人深夜在线观看| 99在线精品一区二区三区| 99v久久综合狠狠综合久久| 99精品国产视频| 日本高清不卡视频| 欧美亚洲综合久久| 欧美福利视频导航| 日韩你懂的在线观看| 337p粉嫩大胆色噜噜噜噜亚洲| 久久精品视频在线看| 国产精品每日更新在线播放网址 | 欧美一级在线观看| 精品久久人人做人人爱| 国产日产欧美一区| 中文字幕在线一区二区三区| 亚洲黄色尤物视频| 日韩不卡一区二区三区| 国产一区二区91| 91免费视频观看| 日韩一卡二卡三卡| 国产午夜亚洲精品午夜鲁丝片| 国产精品国产三级国产专播品爱网| 一区二区三区丝袜| 美国毛片一区二区| 成人av动漫在线| 欧美精品乱人伦久久久久久| 久久久亚洲精品石原莉奈| 伊人色综合久久天天| 男人的天堂亚洲一区| 成人福利电影精品一区二区在线观看| 91麻豆文化传媒在线观看| 91精品国产乱码久久蜜臀| 国产午夜精品久久| 亚洲h在线观看| 成人美女视频在线观看| 欧美精品乱人伦久久久久久| 日本一区二区三区免费乱视频| 亚洲精品视频在线观看免费| 久久99精品一区二区三区三区| 99re8在线精品视频免费播放| 日韩一级免费观看| 亚洲免费观看高清完整版在线观看| 肉色丝袜一区二区| 91同城在线观看| 久久丝袜美腿综合| 午夜欧美大尺度福利影院在线看| 国产一区91精品张津瑜| 欧美精品xxxxbbbb|