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/top.jsp

57 lines
2.3 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 XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- 设置页面缓存相关的meta标签 -->
<meta http-equiv="pragma" content="no-cache"/> <!-- 禁止浏览器缓存 -->
<meta http-equiv="cache-control" content="no-cache"/> <!-- 禁止缓存控制 -->
<meta http-equiv="expires" content="0"/> <!-- 设置过期时间为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" />
<!-- JavaScript部分用于处理用户操作 -->
<script type="text/javascript">
// 处理注销操作,弹出确认框
function logout() {
// 弹出确认框,确认退出系统
if(confirm("确定要退出本系统吗??")) {
// 如果确认退出,跳转到登录页面
window.parent.location="<%=path %>/login.jsp";
}
}
// 返回首页的操作
function index() {
// 跳转到首页
window.parent.location="<%=path %>/site/default.jsp";
}
</script>
</head>
<body style="background:url(/dingcan/images/top_05.jpg)">
<!-- 页面顶部的标题部分字体白色字号30px距离左边20px距离顶部30px -->
<span style="float:left;margin-left: 20px;color: white;font-size: 30px;margin-top: 30px;">
基于JSP的高校快餐店订餐系统
</span>
<!-- 页面右侧操作链接部分 -->
<span style="float:right;margin-right: 30px;margin-top: 30px;">
<!-- 注销退出链接 -->
<a href="#" style="color: white;font-size: 16px;font-family: 微软雅黑" onclick="logout()">注销退出</a>
<!-- 返回首页链接 -->
<a href="#" style="color: white;font-size: 16px;font-family: 微软雅黑" onclick="index()">返回首页</a>
</span>
</body>
</html>