dtree报错: var d = new dTree("d"); 左侧的菜单可以显示,但是点击父菜单报错d无定义,是怎么回事,急急
请高手帮帮忙,谢谢<linkhref="<%=path%>/css/left.css"rel="stylesheet"type="text/css"/><metahttp...
请高手帮帮忙,谢谢
<link href="<%=path %>/css/left.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/test_thirdProject/dtree/dtree.css" type="text/css"></link>
<script type="text/javascript" src="/test_thirdProject/dtree/dtree.js"></script>
<script type="text/javascript" src="/test_thirdProject/js/jquery.js"></script>
<script type="text/javascript">
var d = new dTree("d");
$(document).ready(function(){
$.ajax({
url:'/test_thirdProject/user_doRight.action',
type:'post',
dataType:'json',
success:function(data){
d.add("ROOT_MENU","-1","OA管理系统");
$.each(data.list,function(i,value){
d.add(value.rightCode,value.rightPrarent,value.rightText,value.rightUrl,'mainFrame','','','',0);
});
//document.writeln(d);
alert(d);
$("#mainDiv").html(d.toString());
}
});
});
</script>
</head>
<body>
<div class="nav" id="nav">
<div class="t" id="menu">
<div id = "mainDiv" style="background:url(../Images/left_bg.gif) -191px 0 repeat-y; line-height:20px; padding-left:20px;">
</div>
</div>
</div>
但点击信息管理的时候的就报错说d未定义
dtree.js 410行错误 展开
<link href="<%=path %>/css/left.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="/test_thirdProject/dtree/dtree.css" type="text/css"></link>
<script type="text/javascript" src="/test_thirdProject/dtree/dtree.js"></script>
<script type="text/javascript" src="/test_thirdProject/js/jquery.js"></script>
<script type="text/javascript">
var d = new dTree("d");
$(document).ready(function(){
$.ajax({
url:'/test_thirdProject/user_doRight.action',
type:'post',
dataType:'json',
success:function(data){
d.add("ROOT_MENU","-1","OA管理系统");
$.each(data.list,function(i,value){
d.add(value.rightCode,value.rightPrarent,value.rightText,value.rightUrl,'mainFrame','','','',0);
});
//document.writeln(d);
alert(d);
$("#mainDiv").html(d.toString());
}
});
});
</script>
</head>
<body>
<div class="nav" id="nav">
<div class="t" id="menu">
<div id = "mainDiv" style="background:url(../Images/left_bg.gif) -191px 0 repeat-y; line-height:20px; padding-left:20px;">
</div>
</div>
</div>
但点击信息管理的时候的就报错说d未定义
dtree.js 410行错误 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询