admin嵌套在spring mvc项目里,菜单栏点击新连接每次都会重置

时间:2024-01-18 11:12:08

admin嵌套在spring mvc项目里,菜单栏点击新连接每次都会重置

<ul class="treeview-menu" id="ul_schedule">
<li><a href="#" onclick="return LoadPage(this)" data-url="/Schedule/Schedule/Index"><i class="fa fa-angle-double-right"></i> <span>今日排班</span></a></li>
<li><a href="#" onclick="return LoadPage(this)" data-url="/Schedule/Schedule/History"><i class="fa fa-angle-double-right"></i> <span>历史排班</span></a></li>
</ul>
function LoadPage(obj) {
$.get($(obj).attr('data-url') + "?n=" + Math.random()).done(function (html) {
$("#main_container").html(html);
$("#nav2").text(" > " + $(obj).find('span').text());
$("#nav1").text($(obj).parent().parent().prev().find('span').text());
});   return false; }