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

196 lines
8.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.

<<<<<<< HEAD
<<<<<<< HEAD
<%@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(); // 获取应用的上下文路径
%>
<!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 文档的 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" /> <!-- 页面描述 -->
<!-- 引入页面样式表 -->
<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; // 阻止表单提交
}
document.formAdd.submit(); // 提交表单
=======
=======
>>>>>>> remotes/origin/wyc_branch
<%@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"%>
<%
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"> <!-- 1.插入时间格式的包.2.插入处理时间的包。34.使用JSTLJSP标准标签库5.使得EL不当成字符串处理-->
<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" />
<link rel="stylesheet" type="text/css" href="<%=path %>/css/base.css" />
<script language="javascript">
function c() //如果评价内容为空,提示请输入评论内容
{
if(document.formAdd.neirong.value=="")
{
alert("请输入评价内容");
return false;
}
document.formAdd.submit(); //如果不为空则提交信息
<<<<<<< HEAD
>>>>>>> remotes/origin/wyp_branch
=======
>>>>>>> remotes/origin/wyc_branch
}
</script>
</head>
<<<<<<< HEAD
<<<<<<< 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'> <!-- 距离左边为2距离上面为9背景图片为。。 -->
<form action="<%=path %>/xinyong?type=xinyongAdd" name="formAdd" method="post"> <!--表单的方法为提交 -->
>>>>>>> remotes/origin/wyp_branch
=======
<body leftmargin="2" topmargin="9" background='<%=path %>/img/allbg.gif'> <!-- 距离左边为2距离上面为9背景图片为。。 -->
<form action="<%=path %>/xinyong?type=xinyongAdd" name="formAdd" method="post"> <!--表单的方法为提交 -->
>>>>>>> remotes/origin/wyc_branch
<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>
<<<<<<< HEAD
<<<<<<< HEAD
<!-- 评价属性选择 -->
=======
>>>>>>> remotes/origin/wyp_branch
=======
>>>>>>> remotes/origin/wyc_branch
<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">
<<<<<<< HEAD
<<<<<<< HEAD
<!-- 评价属性的选择按钮 -->
=======
>>>>>>> remotes/origin/wyp_branch
=======
>>>>>>> remotes/origin/wyc_branch
<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>
<<<<<<< HEAD
<<<<<<< HEAD
<!-- 评价内容输入框 -->
=======
>>>>>>> remotes/origin/wyp_branch
=======
>>>>>>> remotes/origin/wyc_branch
<tr align='center' bgcolor="#FFFFFF" height="22">
<td width="10%" bgcolor="#FFFFFF" align="right">
评价内容:
</td>
<td width="90%" bgcolor="#FFFFFF" align="left">
<<<<<<< HEAD
<<<<<<< HEAD
<input type="text" name="neirong" size="40"/> <!-- 用户输入评价内容 -->
</td>
</tr>
<!-- 自动填写当前时间 -->
=======
<input type="text" name="neirong" size="40"/>
</td>
</tr>
>>>>>>> remotes/origin/wyp_branch
=======
<input type="text" name="neirong" size="40"/>
</td>
</tr>
>>>>>>> remotes/origin/wyc_branch
<tr align='center' bgcolor="#FFFFFF" height="22">
<td width="10%" bgcolor="#FFFFFF" align="right">
评价时间:
</td>
<td width="90%" bgcolor="#FFFFFF" align="left">
<<<<<<< HEAD
<<<<<<< HEAD
<input type="text" name="shijian" size="40" value="<%=new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date())%>"/> <!-- 使用 SimpleDateFormat 获取当前日期和时间 -->
</td>
</tr>
<!-- 隐藏用户ID和表单操作按钮 -->
=======
=======
>>>>>>> remotes/origin/wyc_branch
<input type="text" name="shijian" size="40" value="<%=new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date())%>"/>
<!-- 取得系统当前时间格式为yyyy年-MM月-dd号 HH点mm分 -->
</td>
</tr>
<<<<<<< HEAD
>>>>>>> remotes/origin/wyp_branch
=======
>>>>>>> remotes/origin/wyc_branch
<tr align='center' bgcolor="#FFFFFF" height="22">
<td width="10%" bgcolor="#FFFFFF" align="right">
&nbsp;
</td>
<td width="90%" bgcolor="#FFFFFF" align="left">
<<<<<<< HEAD
<<<<<<< HEAD
<input type="hidden" name="user_id" value="<%=request.getParameter("user_id") %>"/> <!-- 获取传入的 user_id -->
<input type="reset" value="重置"/>&nbsp; <!-- 重置按钮 -->
=======
<input type="hidden" name="user_id" value="<%=request.getParameter("user_id") %>"/> <!-- 插入隐藏域获得用户的id -->
<input type="button" value="提交" onclick="c()"/>&nbsp;
<input type="reset" value="重置"/>&nbsp;
>>>>>>> remotes/origin/wyp_branch
=======
<input type="hidden" name="user_id" value="<%=request.getParameter("user_id") %>"/> <!-- 插入隐藏域获得用户的id -->
<input type="button" value="提交" onclick="c()"/>&nbsp;
<input type="reset" value="重置"/>&nbsp;
>>>>>>> remotes/origin/wyc_branch
</td>
</tr>
</table>
</form>
</body>
</html>