给别人做一个小网站,用得是Servlet,后台有需要一个树形结构,搜了一下发现jstree比较合适
按照网上的例子做了一下,但是做的时候碰到一点问题求大家指点一下这是project.jsp页面
我是直接访问进来的jsp页面
然后希望 jstree能 走后台 自动渲染出树形结构
<body><div id="tree" class="tree"></div>
<script type="text/javascript">
$(function () {
$("#tree").jstree({
data:{
type: "json",
async: true,
opts:{
method: "POST",
url: "http://127.0.0.1:8080/work/ProjectServlet"
}
},
ui:{
dots : true, // BOOL - dots or no dots
theme_name : "default"// if set to false no theme will be loaded
}
}
})
</script></body>问题是:现在的程序不走后台,求大家指点下
按照网上的例子做了一下,但是做的时候碰到一点问题求大家指点一下这是project.jsp页面
我是直接访问进来的jsp页面
然后希望 jstree能 走后台 自动渲染出树形结构
<body><div id="tree" class="tree"></div>
<script type="text/javascript">
$(function () {
$("#tree").jstree({
data:{
type: "json",
async: true,
opts:{
method: "POST",
url: "http://127.0.0.1:8080/work/ProjectServlet"
}
},
ui:{
dots : true, // BOOL - dots or no dots
theme_name : "default"// if set to false no theme will be loaded
}
}
})
</script></body>问题是:现在的程序不走后台,求大家指点下
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货