JavaScript树状目录问题 求助
/*
* list[id] 是保存每个节点信息的数组
* 2010-4-8
*/
var list = [];
var tree = function(objName) {
this.title = objName;
this.liNode = [];
this.ulNode = [];
this.str = document.createElement("div");
this.str.innerHTML = this.title;
//将各个图片的路径封装成json格式
this.imgs = {
folderClose:"img/folderclose.gif",
folderOpen:"img/folderopen.gif",
rootFolder:"img/imgfolder.gif",
line:"img/line.gif",
join:"img/join.gif",
joinButtom:"img/joinbottom.gif",
emty:"img/empty.gif",
noLine_minus:"img/nolines_minus.gif",
noLine_plus:"img/nolines_plus.gif",
plus:"img/plus.gif",
plusBottom:"img/plusbottom.gif",
line:"img/line.gif",
joinButtom:"img/joinbottom.gif",
page:"img/page.gif"
};
};
//节点ID,父节点ID,节点名字,链接,目标 --->节点信息
tree.prototype.node = function(id,parentId,nodeName,url,target) {
this.id = id;
this.parentId = parentId;
this.nodeName = nodeName;
this.url = (url==null?"javascript:void(0)":url);
this.target = (target==null?"":target);
this.idLength = id.length; //ID的长度
this.hasChild = false; //是否有子节点
this.hasparent = fals
相关问答:
我手边有csdn论坛弹出信息窗口的代码(可以从http://www.codefans.net下载),但它显示的只是固定的信息,现在想改造一下以便能通过后台调用Sql Server 2000数据库自动将数据表中的信息作为弹出窗口显示的信息。csdn论 ......
我的jsp是utf-8,我的js文件怎样转为utf-8我现在用的是Dreamweaver cs3 我在jsp引入js时就不行。。
还有大家是用什么来编辑js的。 调试呢
vs2008,eclipse
我用myeclipse更新装spket和jseclipse但是最后报错。浪 ......
新装了系统,写了个测试页:
<html>
<head>
<title>test</title>
<script type="text/javascript">
function do(){
var message=document.getElementB ......
本群是一个javascript初学者群,还可以再进20个名额。QQ群:100172168
我加你 我也是新手咱们共同学习!
百度Hi技术交流群,要进的!点击下面链接接受邀请:
http://im.baidu.com/ginvite/gi/url_confirm.php?i ......