<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>NewBee Tree</title>
<link rel="StyleSheet" href="dtree.css" type="text/css" />
<script type="text/javascript" src="dtree.js"></script>
</head>
<body>
<div class="dtree" style="border: 0px solid #cccccc; background-color: #f3f3f3; padding: 5px; width: 100%;">
<p><a href="javascript: qTree.openAll();">open all</a> | <a href="javascript: qTree.closeAll();">close all</a></p>
<script type="text/javascript">
var qTree = new dTree('qTree','test');
qTree.config.closeSameLevel=true;
qTree.config.inOrder=true;
qTree.config.useCookies=true;
qTree.add(0,-1,'My example tree');
qTree.add(1,0,'Node 1');
qTree.add(2,0,'Node 2','example.html');
qTree.add(3,1,'Node 1.1','example.html');
qTree.add(4,0,'Node 3','example.html');
qTree.add(5,3,'Node 1.1.1','example.html');
qTree.add(6,5,'Node 1.1.1.1','example.html');
qTree.add(7,0,'Node 4','example.html');
qTree.add(8,1,'Node 1.2','example.html');
qTree.add(9,0,'My Pictures','example.html','Pictures I\'ve taken over the years','','img/imgfolder.gif','img/imgfolder.gif');
qTree.add(736422399304017,9,'The trip to Iceland','example.html','Pictures of Gullfoss and Geysir');
qTree.add(736422399304019,7,'Recycle Bin','example.html','','','img/trash.gif');
qTree.add(736422399304018,7,'Mom\'s birthday','example.html');
for(var i=10;i<50;i++){
qTree.add(i,9,'The trip to Iceland','example.html','Pictures of Gullfoss and Geysir');
}
document.write(qTree);
</script>
<script type="text/javascript">
function submitForm(){
var ids = "";
var form = document.getElementById("test");
for (var i=0; i<form.elements.length; i++) {
var element = form.elements[i];
if (element.name == "id" && element.type=='checkbox'){
if( element.checked == true ){
ids = ids + element.value + ",";
alert(ids);
}
}
}
}
</script>
<input type="button" value="提交" onClick="submitForm()"/>
</div>
</body>
</html>
- 1
- 2
前往页