当我单击某个文件时,如何使用 jstree 在右侧 div 中显示内容
树文件在左边,内容div在右边,如何
在右边的div上显示一些数据,
这是我的代码:
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jsTree v.1.0 - full featured demo</title>
<script type="text/javascript" src="_lib/jquery.js"></script>
<script type="text/javascript" src="_lib/jquery.cookie.js"></script>
<script type="text/javascript" src="_lib/jquery.hotkeys.js"></script>
<script type="text/javascript" src="jquery.jstree.js"></script>
<link rel="stylesheet" type="text/css" href="_docs/!style.css" />
<style type="text/css">
html, body { margin:0; padding:0; }
body, td, th, pre, code, select, option, input, textarea { font-family:verdana,arial,sans-serif; font-size:10px; }
.demo, .demo input, .jstree-dnd-helper, #vakata-contextmenu { font-size:10px; font-family:Verdana; }
</style>
</head>
<body>
<div id="demo1" style="float:left;width:50%;">
<ul>
<li>
<a href="">aaa</a>
<!-- UL node only needed for children - omit if there are no children -->
<ul>
<li><a href=""> bbbb</a></li>
<li><a href=""> cccc</a></li>
</ul>
</li>
</ul>
</div>
<div id="content">www</div>
<script type="text/javascript">
$(function () {
$("#demo1").jstree({
"themes": {
"theme": "default",
"dots": true,
"icons": true,
"url": "themes/default/style.css"
},
"plugins" : [ "themes", "html_data" ]
});
});
</script>
</body>
</html>
谢谢
the tree file is on the left , and the content div is on the right , how to show
some data on the right div ,
this is my code :
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jsTree v.1.0 - full featured demo</title>
<script type="text/javascript" src="_lib/jquery.js"></script>
<script type="text/javascript" src="_lib/jquery.cookie.js"></script>
<script type="text/javascript" src="_lib/jquery.hotkeys.js"></script>
<script type="text/javascript" src="jquery.jstree.js"></script>
<link rel="stylesheet" type="text/css" href="_docs/!style.css" />
<style type="text/css">
html, body { margin:0; padding:0; }
body, td, th, pre, code, select, option, input, textarea { font-family:verdana,arial,sans-serif; font-size:10px; }
.demo, .demo input, .jstree-dnd-helper, #vakata-contextmenu { font-size:10px; font-family:Verdana; }
</style>
</head>
<body>
<div id="demo1" style="float:left;width:50%;">
<ul>
<li>
<a href="">aaa</a>
<!-- UL node only needed for children - omit if there are no children -->
<ul>
<li><a href=""> bbbb</a></li>
<li><a href=""> cccc</a></li>
</ul>
</li>
</ul>
</div>
<div id="content">www</div>
<script type="text/javascript">
$(function () {
$("#demo1").jstree({
"themes": {
"theme": "default",
"dots": true,
"icons": true,
"url": "themes/default/style.css"
},
"plugins" : [ "themes", "html_data" ]
});
});
</script>
</body>
</html>
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试类似 http://jsfiddle.net/HthRD/1/ - 具体细节将根据您想要写入其他“窗格”的内容而有所不同。
Try something like http://jsfiddle.net/HthRD/1/ - the specifics are going to vary based on WHAT you want to write to the other "pane".