头部:top.cshtml
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="@Url.Content("~/Scripts/jquery-1.5.1.js")" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#logout").click(function () {
if (confirm("您确定要退出系统吗?")) {
window.parent.location.href = "/Account/LogOff";
}
});
});
function showsubmenu(sid) {
var whichEl = eval("submenu" + sid);
var menuTitle = eval("menuTitle" + sid);
if (whichEl.style.display == "none") {
eval("submenu" + sid + ".style.display=\"\";");
} else {
eval("submenu" + sid + ".style.display=\"none\";");
}
}
function showsubmenu(sid) {
var whichEl = eval("submenu" + sid);
var menuTitle = eval("menuTitle" + sid);
if (whichEl.style.display == "none") {
eval("submenu" + sid + ".style.display=\"\";");
} else {
eval("submenu" + sid + ".style.display=\"none\";");
}
}
</script>
<base target="main" />
<link href="@Url.Content("~/Content/images/skin.css")" rel="stylesheet" type="text/css" />
</head>
<body style="margin-top: 0; margin-left: 0;">
<table width="100%" height="64" border="0" cellpadding="0" cellspacing="0" class="admin_topbg">
<tr>
<td align="right" valign="top">
<a href="javascript:void(0)" id="logout">
<img src="../../Content/images/out.gif" alt="安全退出" width="46" height="20" border="0" />
</a>
</td>
</tr>
</table>
</body>
</html>
左边菜单:left.cshtml
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="@Url.Content("~/Scripts/prototype.lite.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/moo.fx.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/moo.fx.pack.js")" type="text/javascript"></script>
<style type="text/css">
body
{
font: 12px Arial, Helvetica, sans-serif;
color: #000;
background-color: #EEF2FB;
margin: 0px;
}
#container
{
width: 182px;
}
H1
{
font-size: 12px;
margin: 0px;
width: 182px;
cursor: pointer;
height: 30px;
line-height: 20px;
}
H1 a
{
display: block;
width: 182px;
color: #000;
height: 30px;
text-decoration: none;
moz-outline-style: none;
background-image: url(../../Content/images/menu_bgS.gif);
background-repeat: no-repeat;
line-height: 30px;
text-align: center;
margin: 0px;
padding: 0px;
}
.content
{
width: 182px;
height: 26px;
}
.MM ul
{
list-style-type: none;
margin: 0px;
padding: 0px;
display: block;
}
.MM li
{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 26px;
color: #333333;
list-style-type: none;
display: block;
text-decoration: none;
height: 26px;
width: 182px;
padding-left: 0px;
}
.MM
{
width: 182px;
margin: 0px;
padding: 0px;
left: 0px;
top: 0px;
right: 0px;
bottom: 0px;
clip: rect(0px,0px,0px,0px);
}
.MM a:link
{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 26px;
color: #333333;
background-image: url(../../Content/images/menu_bg1.gif);
background-repeat: no-repeat;
height: 26px;
width: 182px;
display: block;
text-align: center;
margin: 0px;
padding: 0px;
overflow: hidden;
text-decoration: none;
}
.MM a:visited
{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 26px;
color: #333333;
background-image: url(../../Content/images/menu_bg1.gif);
background-repeat: no-repeat;
display: block;
text-align: center;
margin: 0px;
padding: 0px;
height: 26px;
width: 182px;
text-decoration: none;
}
.MM a:active
{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 26px;
color: #333333;
background-image: url(../../Content/images/menu_bg1.gif);
background-repeat: no-repeat;
height: 26px;
width: 182px;
display: block;
text-align: center;
margin: 0px;
padding: 0px;
overflow: hidden;
text-decoration: none;
}
.MM a:hover
{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 26px;
font-weight: bold;
color: #006600;
background-image: url(../../Content/images/menu_bg2.gif);
background-repeat: no-repeat;
text-align: center;
display: block;
margin: 0px;
padding: 0px;
height: 26px;
width: 182px;
text-decoration: none;
}
</style>
</head>
<body>
<table width="100%" height="280" border="0" cellpadding="0" cellspacing="0" bgcolor="#EEF2FB">
<tr>
<td width="182" valign="top">
<div id="container">
<h1 class="type">
<a href="javascript:void(0)">用户管理</a></h1>
<div class="content">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<img src="../../Content/images/menu_topline.gif" width="182" height="5" />
</td>
</tr>
</table>
<ul class="MM">
<li><a href="@Url.Action("Create", "User")" target="main">添加用户</a></li>
<li><a href="@Url.Action("Index", "User")" target="main">用户列表</a></li>
</ul>
</div>
<h1 class="type">
<a href="javascript:void(0)">文字直播管理</a></h1>
<div class="content">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<img src="../../Content/images/menu_topline.gif" width="182" height="5" />
</td>
</tr>
</table>
<ul class="MM">
<li><a href="@Url.Action("Index", "Category")" target="main">类别管理</a></li>
<li><a href="@Url.Action("Index", "Title")" target="main">标题管理</a></li>
<li><a href="@Url.Action("Create", "Text")" target="main">添加文字</a></li>
<li><a href="@Url.Action("Index", "Text")" target="main">文字列表</a></li>
</ul>
</div>
<script type="text/javascript">
var contents = document.getElementsByClassName('content');
var toggles = document.getElementsByClassName('type');
var myAccordion = new fx.Accordion(
toggles, contents, { opacity: true, duration: 400 }
);
myAccordion.showThisHideOpen(contents[1]);
</script>
</td>
</tr>
</table>
</body>
</html>
首页:Index.cshtml
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<title>test</title>
</head>
<frameset rows="64,*" frameborder="NO" border="0" framespacing="0">
<frame src="@Url.Action("Top")" noresize="noresize" frameborder="NO" name="topFrame" scrolling="no" marginwidth="0" marginheight="0" target="main" />
<frameset cols="200,*" rows="640,*" id="frame">
<frame src="@Url.Action("Left")" name="leftFrame" noresize="noresize" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" target="main" />
<frame src="" name="main" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="_self" />
</frameset>
<noframes>
<body></body>
</noframes>
</html>
Controller:
public ActionResult Index()
{
return View();
}
public ActionResult Top()
{
return View();
}
public ActionResult left()
{
return View();
}
效果如下: