添加注释

wlk_branch^2
IE-WEB 8 months ago
parent 924e1b297c
commit 58866100ec

@ -1,79 +1,86 @@
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false"%>
<%@page import="java.text.SimpleDateFormat"%> <!-- 引入 SimpleDateFormat 用于格式化日期 -->
<%@page import="java.util.Date"%> <!-- 引入 Date 类用于获取当前日期和时间 -->
<%@ page language="java" pageEncoding="UTF-8"%> <!-- 设置页面的语言为 Java 和字符编码为 UTF-8 -->
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <!-- 引入 JSTL 核心标签库 -->
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> <!-- 引入 JSTL 格式化标签库 -->
<%@ page isELIgnored="false"%> <!-- 启用表达式语言 (EL) -->
<%
String path = request.getContextPath();
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">
<html xmlns="http://www.w3.org/1999/xhtml"> <!-- 定义 HTML 文档的 XML 命名空间 -->
<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" />
<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" /> <!-- 页面描述 -->
<!-- 引入页面样式表 -->
<link rel="stylesheet" type="text/css" href="<%=path %>/css/base.css" />
<!-- 定义 JavaScript 函数,用于验证表单内容 -->
<script language="javascript">
function c()
{
// 如果评价内容为空,弹出提示框
if(document.formAdd.neirong.value=="")
{
alert("请输入评价内容");
return false;
return false; // 阻止表单提交
}
document.formAdd.submit();
document.formAdd.submit(); // 提交表单
}
</script>
</head>
<body leftmargin="2" topmargin="9" background='<%=path %>/img/allbg.gif'>
<form action="<%=path %>/xinyong?type=xinyongAdd" name="formAdd" method="post">
<body leftmargin="2" topmargin="9" background='<%=path %>/img/allbg.gif'> <!-- 设置页面背景 -->
<form action="<%=path %>/xinyong?type=xinyongAdd" name="formAdd" method="post"> <!-- 表单提交地址和方法 -->
<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
<tr bgcolor="#E7E7E7">
<td height="14" colspan="4" background="<%=path %>/img/tbg.gif">&nbsp;&nbsp;</td>
</tr>
<!-- 评价属性选择 -->
<tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';" onMouseOut="javascript:this.bgColor='#FFFFFF';" height="22">
<td width="10%" bgcolor="#FFFFFF" align="right">
评价属性:
</td>
<td width="90%" bgcolor="#FFFFFF" align="left">
<!-- 评价属性的选择按钮 -->
<input type="radio" name="shuxing" value="好评" checked="checked" style="border: 0px;"/>好评
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="shuxing" value="差评" style="border: 0px;"/>差评
</td>
</tr>
<!-- 评价内容输入框 -->
<tr align='center' bgcolor="#FFFFFF" height="22">
<td width="10%" bgcolor="#FFFFFF" align="right">
评价内容:
</td>
<td width="90%" bgcolor="#FFFFFF" align="left">
<input type="text" name="neirong" size="40"/>
<input type="text" name="neirong" size="40"/> <!-- 用户输入评价内容 -->
</td>
</tr>
<!-- 自动填写当前时间 -->
<tr align='center' bgcolor="#FFFFFF" height="22">
<td width="10%" bgcolor="#FFFFFF" align="right">
评价时间:
</td>
<td width="90%" bgcolor="#FFFFFF" align="left">
<input type="text" name="shijian" size="40" value="<%=new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date())%>"/>
<input type="text" name="shijian" size="40" value="<%=new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date())%>"/> <!-- 使用 SimpleDateFormat 获取当前日期和时间 -->
</td>
</tr>
<!-- 隐藏用户ID和表单操作按钮 -->
<tr align='center' bgcolor="#FFFFFF" height="22">
<td width="10%" bgcolor="#FFFFFF" align="right">
&nbsp;
</td>
<td width="90%" bgcolor="#FFFFFF" align="left">
<input type="hidden" name="user_id" value="<%=request.getParameter("user_id") %>"/>
<input type="reset" value="重置"/>&nbsp;
<input type="hidden" name="user_id" value="<%=request.getParameter("user_id") %>"/> <!-- 获取传入的 user_id -->
<input type="reset" value="重置"/>&nbsp; <!-- 重置按钮 -->
</td>
</tr>
</table>

Loading…
Cancel
Save