1 回答
TA贡献1859条经验 获得超6个赞
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'>租户dddd管理2</a></li>";
html+="</ul>";
html+="</li>";
html+="</c:if>";
html+="</ul>";
html+="<script src='js/custom.js'><\/script>";
$('#menu').append(html);
要把<script src='js/custom.js'><\/script>页拼接在html中才会有效
添加回答
举报