You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
test/cont.jsp

188 lines
9.0 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml"> <!-- 管理员界面 -->
<head>
<<<<<<< HEAD
<meta http-equiv="pragma" content="no-cache"/><%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%
// 获取当前请求的上下文路径,通常用于生成相对路径
String path = request.getContextPath();
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml"> <!-- 管理员界面 -->
<head>
<!-- 禁止页面缓存 -->
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<!-- 设置页面的关键词和描述,用于搜索引擎优化 -->
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<!-- 引入外部CSS样式文件 -->
<link href="<%=path %>/css/cont.css" rel="stylesheet" type="text/css"/> <!-- CSS样式的路径是path/css/cont.css -->
<!-- JavaScript部分用于处理左侧栏的切换功能 -->
<script type="text/javascript">
function switchSysBar(){
// 获取当前页面的URL地址并去掉"/admin/cont.jsp"部分
var locate=location.href.replace('<%=path %>/admin/cont.jsp','');
// 获取图片路径,去掉域名部分,只保留文件路径
var ssrc=document.all("img1").src.replace(locate,'');
// 如果当前图片是/jiaju/images/cont_19.gif则切换为/jiaju/images/cont_1_19.gif并隐藏左侧栏
if (ssrc=="/jiaju/images/cont_19.gif") {
document.all("img1").src="/jiaju/images/cont_1_19.gif"; // 更新图片路径
document.all("frmTitle").style.display="none"; // 隐藏左侧栏
} else {
// 否则,恢复图片为默认状态,并显示左侧栏
document.all("img1").src="/jiaju/images/cont_19.gif";
document.all("frmTitle").style.display="";
}
}
</script>
</head>
<body>
<!-- 设置页面样式,隐藏滚动条 -->
<body style="overflow:hidden">
<!-- 页面结构,使用表格布局 -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" class="cont_tab">
<!-- 表格的行 -->
<tr>
<!-- 左侧栏包含iframe加载的内容 -->
<td width="180" id="frmTitle" align="center" valign="top">
<!-- 左侧栏的iframe加载路径为<%=path %>/admin/left.jsp -->
<iframe name="left" height="100%" width="180" src="<%=path %>/admin/left.jsp" frameborder="0" scrolling="no">
浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。
</iframe>
</td>
<!-- 主内容区 -->
<td align="center" valign="top" style="padding-right:8px;">
<!-- 内部表格,用于分割页面内容 -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;">
<tr>
<td height="13" style="line-height:13px;">
<!-- 边框的分隔行 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed;">
<tr>
<td class="cont_tab_l">&nbsp;</td>
<td class="cont_tab_m">&nbsp;</td>
<td class="cont_tab_r">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<!-- 主内容区的iframe -->
<td>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;">
<tr>
<td>
<!-- 右侧内容区的iframe加载路径为<%=path %>/admin/right.jsp -->
<iframe name="I1" height="100%" width="100%" src="<%=path %>/admin/right.jsp" border="0" frameborder="0" scrolling="auto">
浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。
</iframe>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="13" style="line-height:13px;">
<!-- 底部分隔行 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed;">
<tr>
<td class="cont_tab_bl">&nbsp;</td>
<td class="cont_tab_bm">&nbsp;</td>
<td class="cont_tab_br">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
=======
<meta http-equiv="pragma" content="no-cache"/>
>>>>>>> remotes/origin/wyp_branch
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="expires" content="0"/>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
<meta http-equiv="description" content="This is my page"/>
<link href="<%=path %>/css/cont.css" rel="stylesheet" type="text/css"/> <!-- 调用一个外部的CSS样式文件,css的链接路径是path/css/cont.css,调用的样式为stylesheet类型是css -->
<!--脚本类型是JavaScript-->
<script type="text/javascript">
function switchSysBar(){
var locate=location.href.replace('<%=path %>/admin/cont.jsp',''); //定义一个变量locate取得当前url地址代替上述域名
var ssrc=document.all("img1").src.replace(locate,''); //将所有name = img1的图片地址中去掉刚才上面得到的路径 只留下类似images/*.gif的字符串
if (ssrc=="/jiaju/images/cont_19.gif") //如果图片是/jiaju/images/cont_19.gif则将它换成/jiaju/images/cont_1_19.gif并隐藏frmTitle
{
document.all("img1").src="/jiaju/images/cont_1_19.gif";
document.all("frmTitle").style.display="none"
}
else
{
document.all("img1").src="/jiaju/images/cont_19.gif";
document.all("frmTitle").style.display=""
} //否则将图片替换成/jiaju/images/cont_19.gif并显示frmTitle
}
</script>
</head>
<body>
<body style="overflow:hidden"> <!-- 隐藏滚动条 -->
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" class="cont_tab"> <!--表格宽度为100% 高度为100% 表中小格子边框为0小格子中文字距离小格子距离为0小格子之间距离为0小格子紧密的靠在一起样式为css中的cont_tab-->
<tr>
<td width="180" id="frmTitle" align="center" valign="top">
<iframe name="left" height="100%" width="180" src="<%=path %>/admin/left.jsp" frameborder="0" scrolling="no">
浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</iframe> </td>
<!-- <td width="8" valign="middle" onClick="switchSysBar()"><img src="/jiaju/images/cont_19.gif" width="8" height="64" name="img1" id="img1" title="打开/关闭左侧栏" style="cursor:hand;"></td> -->
<td align="center" valign="top" style="padding-right:8px;"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;">
<tr>
<td height="13" style=" line-height:13px;"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed;">
<tr>
<td class="cont_tab_l">&nbsp;</td>
<td class="cont_tab_m">&nbsp;</td>
<td class="cont_tab_r">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;">
<tr>
<td><iframe name="I1" height="100%" width="100%" src="<%=path %>/admin/right.jsp" border="0" frameborder="0" scrolling="auto"> 浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</iframe></td>
</tr>
</table></td>
</tr>
<tr>
<td height="13" style="line-height:13px;"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout:fixed;">
<tr>
<td class="cont_tab_bl">&nbsp;</td>
<td class="cont_tab_bm">&nbsp;</td>
<td class="cont_tab_br">&nbsp;</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>