demo.html.bak

来自「javascript 方便简单的实现树行要求 里面有使用 说明」· BAK 代码 · 共 51 行

BAK
51
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
	"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>

<title></title>
<!-- The xtree script file -->
<script src="xtree.js"></script>

<!-- Modify this file to change the way the tree looks -->
<link type="text/css" rel="stylesheet" href="xtree.css">

<style>
	body { background: white; color: black; }
	input { width: 120px; }
</style>

</head>
<body>

<div style="position: absolute; width: 200px; top: 0px; left: 0px; height: 100%; padding: 5px; overflow: auto;">

<!-- js file containing the tree content, edit this file to alter the menu,
     the menu will be inserted where this tag is located in the document -->
<script src="tree.js"></script>

</div>
<div style="position: absolute; left: 205px; top: 10px;">

 <input type="button" onclick="addNode();"  style="width: 80px;" value="Add one" />



</div>


</body>
<script>
function addNode() {
	if (tree.getSelected()) {
		alert(tree.getSelected());
		alert(tree.getSelected().value);
		tree.getSelected().add(new WebFXTreeItem('New','test.html'));
	}
}
</script>


</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?