个人认为梅花雪的很好,你看CSDN论坛左侧的那个树就是梅花雪的,下载地址是:
http://www.meizz.com/Web/Demo/MzTreeView10.htm
http://www.meizz.com/Web/Demo/MzTreeView10.htm
解决方案 »
- 写一个JS类, 可以一次生成如下的这样的相册
- js checkBox问题
- 菜鸟提问!!
- 怎样通过js将excel表格中的内容直接复制到网页?
- 一个表格,我点其中一行,这行颜色改变,并且这行所有的checkbox都选中,这个功能怎么实现呢?
- 请问下JavaScript如何 获取鼠标光标所在位置处的文本
- 关于javascript:top.doLink,初学者,想该别人的代码不知道这个是什么意思!
- 我有一个<TR>名字知道.想改这个TR里面所有TD的属性.怎么改?
- 如何实现F11的功能?
- 求助大神,无法访问此网站 localhost 拒绝了我们的连接请求
- 关于Microsoft.XMLHTTP 与MSXML2.XMLHTTP的一个问题
- DOM.setAttribute用法问题
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function Point(iX, iY){
this.x = iX;
this.y = iY;
}
function fGetXY(aTag){
var oTmp = aTag;
var pt = new Point(0,0);
do {
pt.x += oTmp.offsetLeft;
pt.y += oTmp.offsetTop;
oTmp = oTmp.offsetParent;
} while(oTmp!=null);
return pt;
}
function showDiv(div,pos){
var pt=fGetXY(pos);
div.style.left=pt.x+pos.offsetWidth;
div.style.top=pt.y+pos.offsetHeight;
div.style.display='block';
}
function hideDiv(div){
div.style.display='none';
alert()
}
</script>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:150px;
height:50px;
z-index:1;
background-color: #FFFFCC;
display:none;
}
.key{
cursor:hand;
color:blue;
font-size:12px;
}
-->
</style>
</head>
<body topmargin="100" leftmargin="100">
<div id="Layer1">啦啦啦,出现了。</div>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
<p><span oncontextmenu="showDiv(Layer1,this); return false" class="key">测试链接</span></p>
</body>
</html>
我需要将tree放入一个iframe中
方法是我在tree下又放了一个iframe,name是“edit_tree”,然后将tree的id值传入edit_tree的iframe,在下面的iframe中对tree进行编辑、添加、删除等操作。