js调用本函数里另一个函数里的变量
dTree.prototype.node = function (node, nodeId)
{
var divSelected = "onmouseover = \"this.style.backgroundColor='#FFF250';\" onmouseout = \"this.style.backgroundColor='#FFFFFF';\"";
var str = "<div "+divSelected+" class=\"dTreeNode\">" + this.indent(node, nodeId);
if (this.config.useIcons)
{
if (!node.icon)
{
node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node);
}
if (!node.iconOpen)
{
node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node;
}
if (this.root.id == node.pid)
{
node.icon = this.icon.root;
node.iconOpen = this.icon.root;
}
str += "<span style=\"width:300px;overflow:hidden; text-overflow:ellipsis; white-space:nowrap;\"><img id=\"i" + this.obj + nodeId + "\" src=\"" + ((node._io) ? node.iconOpen : node.icon) + "\" alt=\"\" />";
//添加上复选框
if (this.config.check == true) {
str += '<input
value=" " name="xyz" type="checkbox" id="c' + this.obj + node.id
+ '" onclick="javascript:' + this.obj + '.cc(' + node.id
+ ',' + node.pid + ')"/>';
}
}
//alert(xyz);
//style="background: b4b4b4;border:0px"
//最后要为点中复选框的事件添加cc方法
//点击复选框onclick事件
dTree.prototype.cc=function(nodeId, nodePid){
//首先获取这个多选框的id
var cs = document.getElementById("c" + this.obj + nodeId).checked;
//alert(nodeId+"==");
var n,node = this.aNod