📄 memoedit.jsp
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%
String jspURL = request.getRequestURI();
if(jspURL.indexOf("jsp")!=-1)
jspURL = jspURL.substring(jspURL.indexOf("jsp")-1);
if(jspURL.indexOf("?")!=-1)
jspURL = jspURL.substring(0,jspURL.indexOf("?")-1);
%>
<!-- 个人备忘录新建页面 <%=jspURL%> edited by Ray 2005-11-17 -->
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%
String datetime = request.getParameter("datetime");
String currentDay = request.getParameter("currentDay");
String selectDay = request.getParameter("selectDay");
Date now=new Date();
SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd");
String formatTime2 = "";
if(selectDay!=null&&!("null".equals(selectDay))&&!("".equals(selectDay))){
formatTime2 = selectDay;
}else{
formatTime2 = formatter2.format(now);
}
%>
<html>
<head>
<title>编辑备忘录</title>
<SCRIPT LANGUAGE="JavaScript" src="<%=request.getContextPath()%>/include/calendar.js"></SCRIPT>
<script language="JavaScript" src="<%=request.getContextPath()%>/include/common.js"></script>
<SCRIPT language=JavaScript>
<!--
function checkform(url)
{
if (document.formmemo.subject.value == "")
{
alert('请填写主题以便以后阅读!');
document.formmemo.subject.focus();
return false;
}
if (document.formmemo.content.value == "")
{
alert('请填写内容以便以后阅读!');
document.formmemo.content.focus();
return false;
}
if(getLength(document.formmemo.content.value) > 400){
alert("输入内容不能超过200个汉字!");
document.formmemo.content.focus();
return false;
}
document.formmemo.action=url+"/servlet/AddMemoServlet";
document.formmemo.submit();
//location.href='javascript:history.go(-1)';
}
//清除
function rewrite(){
document.formmemo.subject.value="";
document.formmemo.content.value="";
return false;
}
function fPopUpCalendarDlg(ctrlobj){
showx = event.screenX - event.offsetX +4 ; // + deltaX;
showy = event.screenY - event.offsetY + 18; // + deltaY;
newWINwidth = 210 + 4 + 18;
retval = window.showModalDialog("<%=request.getContextPath()%>/include/date.htm", "", "dialogWidth:197px; dialogHeight:210px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; status:no; directories:yes;scrollbars:no;Resizable=no; " );
if( retval != null ){
ctrlobj.value = retval;
}
}
function update(){
if(<%=currentDay%>==true){
//curday.style.display = "block";
oneday.style.display = "none";
//document.formmemo.startTime1.value = "<%=formatTime2%>";
}else{
//curday.style.display = "none";
oneday.style.display = "block";
document.formmemo.startTime1.value = "";
}
}
//-->
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="<%=request.getContextPath()%>/css/style.css" rel="stylesheet" type="text/css">
</head>
<body background="<%=request.getContextPath()%>/images/grid.gif" marginwidth="0"
marginheight="0">
<br>
<form name="formmemo" action='' method='POST'>
<input name=selectDay type=hidden value="<%=selectDay%>">
<table width="75%" align="center" cellpadding="0" cellspacing="0" bordercolordark="#DFDFFF" bordercolorlight="#003366" bgcolor="#EEF4FF" border="1">
<tr>
<td align="center" bgcolor="#a6d0f2" height="24" colspan="2">备忘录</td>
</tr>
<tr>
<td width="100%">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
<tr>
<td id="oneday" background="<%=request.getContextPath()%>/images/bg-09.jpg" bgcolor="#D8EAF8" colspan="2">时间:
<input type="text" name="startTime2" value="<%=datetime%>" size="16" class="txt2" readonly style="cursor:hand">
<select name="hour_m" >
<option value="0" selected>0</option>
<option value="1" >1</option>
<option value="2" >2</option>
<option value="3" >3</option>
<option value="4" >4</option>
<option value="5" >5</option>
<option value="6" >6</option>
<option value="7" >7</option>
<option value="8" >8</option>
<option value="9" >9</option>
<option value="10" >10</option>
<option value="11" >11</option>
<option value="12" >12</option>
<option value="13" >13</option>
<option value="14" >14</option>
<option value="15" >15</option>
<option value="16" >16</option>
<option value="17" >17</option>
<option value="18" >18</option>
<option value="19" >19</option>
<option value="20" >20</option>
<option value="21" >21</option>
<option value="22" >22</option>
<option value="23" >23</option>
</select> 时
<select name="minu_m" >
<option value="0" selected >:00</option>
<option value="5" >:05</option>
<option value="10" >:10</option>
<option value="15" >:15</option>
<option value="20" >:20</option>
<option value="25" >:25</option>
<option value="30" >:30</option>
<option value="35" >:35</option>
<option value="40" >:40</option>
<option value="45" >:45</option>
<option value="50" >:50</option>
<option value="55" >:55</option>
</select>分
</td>
</tr>
<tr>
<td background="<%=request.getContextPath()%>/images/bg-13.gif" class="text-01" height="1" colspan="2"></td>
</tr>
<tr>
<td background="<%=request.getContextPath()%>/images/bg-09.jpg" bgcolor="#D8EAF8">主题:<input name="subject" type="text" class="txt2" size="50" /></td>
<td width="35%" bgcolor="#D8EAF8"> </td>
</tr>
<tr>
<td background="<%=request.getContextPath()%>/images/bg-13.gif" class="text-01" height="1" colspan="2"></td>
</tr>
<tr>
<td bgcolor="#D8EAF8" colspan="2" align="left" >
备忘录内容:<br>
<textarea class="txt2" name="content" cols=74 rows=8></textarea><br>
说明:备忘录内容不能超过200字
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<br>
<center>
<td align="center">
<img src="<%=request.getContextPath()%>/images/save.gif" onClick="checkform('<%=request.getContextPath()%>');" style="cursor:hand">
<img src="<%=request.getContextPath()%>/images/clean.gif" onclick="rewrite();" style="cursor:hand">
<img src="<%=request.getContextPath()%>/images/return.gif" onclick="location.href='javascript:history.go(-1)'" style="cursor:hand">
</td>
</center>
</form>
<script language="javascript">
//update();
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -