<link rel="stylesheet" href="../jquery.treeview.css" type="text/css" />
<script src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/jquery.treeview.js"></script>
<script src="../js/jquery.cookie.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#red").treeview({
animated: "fast",
collapsed: true,
unique: true,
toggle: function() {
window.console &&console.log("%o was toggled", this)
}
})
})
</script>
html如下:
<ul id="red">
<li class="open"><span>北京市</span>
<ul>
<li class="open"><span>西城区</span>
<ul>
<li class="open"><span>西直门</span>
<ul>
<li><span>西环广场</span></li>
</ul>
</li>
<li><span>马甸</span>
<ul>
<li><span>浙江大厦</span></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
应该是可以实现的,把a页面的tree数据存到数据库,然后通过b页面读写操作,原始的就是这样要用js的话,应该就是在你的项目目录下找到a.html,然后获取tree内容,结构,然后进行修改,不过我也没有这样做过,思路应该是这样
不要用gb2312, 先转换为utf-8,iconv(province.stock, to="utf-8")
htmlTreeParse处理后,再转换为
iconv(province.stock, to="gb2312")