2 dnf3535 dnf3535 于 2013.07.18 12:42 提问

.net 下应用ztree , 树不显示

代码如下:

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1"><title>

</title><link rel="Stylesheet" href="../../../Content/default.css" />
<script type="text/javascript" src="../../../Scripts/jquery/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../../Scripts/jquery/jquery-1.7.2.min.js"></script>
<link rel="stylesheet" href="../../../Scripts/jquery/ztree/css/zTreeStyle/zTreeStyle.css" type="text/css" />
<script type="text/javascript" src="../../../Scripts/jquery/ztree/js/jquery.ztree.core-3.2.js"></script>
<script type="text/javascript" src="../../../Scripts/jquery/ztree/js/jquery.ztree.core-3.2.min.js"></script>
<script type="text/javascript">

var setting = {
async:{
enable :true,
url: "../common/asynctreenode.aspx",
autoParam: ["id","name"]
},
view: {
dblClickExpand: false,
showLine: true,
selectedMulti: false,
expandSpeed: ($.browser.msie && parseInt($.browser.version)<=6)?"":"fast"
},
callback: {
beforeClick: function(treeId, treeNode){
window.parent.maincontent.location.replace('maincontent.aspx?sjdwbm='+treeNode.id+"&sjdwmc="+treeNode.name);
}
}
};
var zrootNodes = [{'id':'id1','name':'name1',isParent:true},{'id':'id2','name':'name2',isParent:true}];

$(document).ready(function () {
//以下为第一次要加载的一级节点
$.fn.zTree.init($("#treeDemo"), setting, zrootNodes);
});
</script>
</head>
<body>
<div class="zTreeDemoBackground left">
<ul id="treeDemo" class="ztree"></ul>
</div>
</body>
</html>

1个回答

showbo
showbo   Ds   Rxr 2016.02.19 09:48

F12开浏览器控制台报什么错误,网络选项卡里面是否jquery,ztree等js,css是404的没有正确加再进来

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!