1 回答

TA貢獻(xiàn)1859條經(jīng)驗(yàn) 獲得超6個(gè)贊
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>應(yīng)用測試";
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中才會(huì)有效
添加回答
舉報(bào)