WebRoot/js/treemenu.js
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
var openImg = new Image();
var closedImg = new Image();
var BASE_PATH = "";
function showBranch(branch){
var objBranch = document.getElementById(branch).style;
if (objBranch.display=="block")
objBranch.display="none";
else
objBranch.display="block";
swapFolder('I' + branch);
}
function swapFolder(img){
objImg = document.getElementById(img);
if (objImg.src.indexOf('closed.gif')>-1)
objImg.src = openImg.src;
else
objImg.src = closedImg.src;
}
function tree(){
this.branches = new Array();
this.add = addBranch;
this.write = writeTree;
this.GetBranchSize = GetBranchSize;
}
function GetBranchSize() {
return this.branches.length;
}
function addBranch(branch){
this.branches[this.branches.length] = branch;
}
function writeTree(){
var treeString = '';
var numBranches = this.branches.length;
for (var i=0;i <numBranches;i++)
treeString += this.branches[i].write();
document.write(treeString);
}
function branch(id, text){
this.id = id;
this.text = text;
this.write = writeBranch;
this.add = addLeaf;
this.leaves = new Array();
}
function addLeaf(leaf){
this.leaves[this.leaves.length] = leaf;
}
function writeBranch(){
var branchString = '<span class="branch"' + 'onClick="showBranch(\'' + this.id + '\')"';
branchString += '><img width=15 height=15 src="' + BASE_PATH +'images/closed.gif" id="I' + this.id + '" /> ' + this.text;
branchString += '</span>';
branchString += '<span class="leaf" id="';
后面还有 120 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
