<!DOCTYPE html>
<html>
<head>
<title>SaaS</title>
<link href="style/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" href="style/font-awesome.css">
<link href="style/style.css" rel="stylesheet">
<script type="text/javascript" src="js/jquery-3.2.1.min.js"></script>
</head>
<body>
<div class="content">
<div id="menu" class="sidebar">
<div class="sidebar-dropdown"></div>
</div>
</div>
<script>
$.ajax({
url:'GetmenuServlet',
type:'get',
dataType:'text',
success:function (data) {
var html ="<ul id='nav'>";
html+="<li><a href='index.jsp' class='open'><i class='icon-home'></i> 首页</a></li>";
html+="<c:if test='${username!=null}'>";
html+="<li class='has_sub'><a href='#'><i class='icon-home'></i>应用测试";
html+="<span class='pull-right'><i class='icon-chevron-right'></i></span>";
html+="</a>";
html+="<ul>";
html+="<li><a href='index.jsp'>租户管理</a></li>";
html+="<li><a href='index.jsp'>租户管理2</a></li>";
html+="</ul>";
html+="</li>";
html+="</c:if>";
html+="</ul>";
$('#menu').append(html);
}
});
</script>
<script src="js/jquery.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/custom.js"></script>
</body>
</html>
其中应用测试菜单下的两个子菜单无法展开,个人觉得是custom.js里的动作没有实现,但是怎么也改不出来,求如何实现
BIG阳
相关分类