标题:帮帮忙 斑竹
取消只看楼主
luke911
Rank: 1
等 级:新手上路
帖 子:66
专家分:0
注 册:2005-10-21
 问题点数:0 回复次数:0 
帮帮忙 斑竹
帮帮忙 斑竹,解释下下面那段代码:
function alai_tree_check()
{
if(typeof(alai_tree)!="function")
{
alert("run alai_tree_check() fail, please load alai_tree firt!")
return
}
//add(toNode,relation,text,key,ico,exeCategory,exeArg)
var colChkNode=[]
alai_tree.prototype.colChkNode=colChkNode
alai_tree.prototype.addChkNode=function(toNode,text,ico,value,exeArg,checked)
{
var newNode=this.add(toNode,"last",text,"",ico,value,exeArg)
var chkBox=document.createElement('<input type="Checkbox" >')
var tree=this
newNode.label.insertAdjacentElement("beforeBegin",chkBox)
newNode.isCheck=true
if(typeof(checked)=="boolean")chkBox.checked=checked;
newNode.oncheck=new Function("return true;")
chkBox.onpropertychange=function(){if(newNode.oncheck())tree.oncheck(newNode)}
colChkNode[colChkNode.length]=newNode
newNode.checkBox=chkBox
return newNode
}
alai_tree.prototype.oncheck=new Function("return true;")
}
alai_tree_check()
搜索更多相关主题的帖子: tree alai ico var 
2005-11-07 09:45



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-32896-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.049115 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved