Showing
1 changed file
with
5 additions
and
4 deletions
@@ -35,15 +35,15 @@ | @@ -35,15 +35,15 @@ | ||
35 | 35 | ||
36 | <!-- 头部 --> | 36 | <!-- 头部 --> |
37 | <div id="header"> | 37 | <div id="header"> |
38 | - <h1><a href="#">yoho</a></h1> | 38 | + <h1>yoho</a></h1> |
39 | </div> | 39 | </div> |
40 | 40 | ||
41 | <!-- 左侧菜单项 --> | 41 | <!-- 左侧菜单项 --> |
42 | <div id="sidebar"> | 42 | <div id="sidebar"> |
43 | <ul> | 43 | <ul> |
44 | <li class=""><a href="#"><i class="icon icon-home"></i> <span>Dashboard</span></a></li> | 44 | <li class=""><a href="#"><i class="icon icon-home"></i> <span>Dashboard</span></a></li> |
45 | - <li class="active" onclick="clickMenuToPage('/jsp/table.jsp')"><a href="#" ><i class="icon icon-th"></i> <span>Tables</span></a></li> | ||
46 | - <li class="" onclick="clickMenuToPage('jsp/host/hostInfoList.jsp')"><a href="#" ><i class="icon icon-th"></i> <span>主机信息</span></a></li> | 45 | + <li class="" id="jsptablejsp" onclick="clickMenuToPage('/jsp/table.jsp')"><a href="#" ><i class="icon icon-th"></i> <span>Tables</span></a></li> |
46 | + <li class="" id="jsphosthostInfoListjsp" onclick="clickMenuToPage('jsp/host/hostInfoList.jsp')"><a href="#" ><i class="icon icon-th"></i> <span>主机信息</span></a></li> | ||
47 | </ul> | 47 | </ul> |
48 | </div> | 48 | </div> |
49 | <!-- 右侧具体内容 --> | 49 | <!-- 右侧具体内容 --> |
@@ -53,7 +53,8 @@ | @@ -53,7 +53,8 @@ | ||
53 | 53 | ||
54 | <script type="text/javascript"> | 54 | <script type="text/javascript"> |
55 | function clickMenuToPage(page){ | 55 | function clickMenuToPage(page){ |
56 | - $(this).addClass("active"); | 56 | + var g = page.replace(/\//g,"").replace(".",""); |
57 | + $("#"+g).addClass("active").siblings().removeClass("active"); | ||
57 | //加载左侧内容 | 58 | //加载左侧内容 |
58 | $("#content").load(contextPath+page); | 59 | $("#content").load(contextPath+page); |
59 | } | 60 | } |
-
Please register or login to post a comment