writemsg.jsp

来自「采用j2ee架构做的bbs」· JSP 代码 · 共 91 行

JSP
91 行
字号
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<script language=JavaScript>

function check(submitvalue){ 
    if(document.form.msg_to.value==""){
     	alert("请填写收件人");
     	window.document.form.msg_to.focus();
     	return false;
   }
  else  if(document.form.msg_topic.value==""){
      alert("请填写主题");
      window.document.form.msg_topic.focus();
      return false;
    }
  else if(document.form.msg_words.value=="")
   {
      alert("内容不能为空");
      window.document.form.msg_words.focus();
      return false;
    }
   
 else if(submitvalue=="sent") 
		document.form.action="sentmsg.jsp";

 else if(submitvalue=="save") 
		document.form.action="savemsg.jsp";

		form.submit();
}

function closeWindow(){
	Window.close()
}

</script>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>编写短消息</title>
<style type="text/css">
<!--
.STYLE10 {font-family: "宋体"; font-weight: bold; font-size: 12px; }
.STYLE12 {font-family: "宋体"; font-weight: bold; font-size: 12px; color: #FFFFFF; }
.STYLE15 {font-size: 12px}
-->
</style>
</head>
<body>
<form name=form  method=post  onSubmit="check(submitvalue)">
<table  width="666" border="1" align="center" bordercolorlight="#7777FF" bordercolordark="#7777FF" style="border-collapse:collapse">
<tr>
  <td align="center" height="25" colspan="2" background="images/skin/1/bg_td.gif"><span class="STYLE12">编写短消息</span></td>
</tr>
<tr><td height="50" colspan="2" align="center">

<a class=zh href="writemsg.jsp">
<img src="images/button/write.gif" width="40" height="40"></a>&nbsp;
<a class=zh href="writemsg.jsp">
<img src="images/button/re.gif" width="40" height="40"></a>&nbsp;
<a class=zh href="message.jsp"><img src="images/button/msg.gif" width="40" height="40"></a></td>
</tr>
<tr>
<td width="70" height="30" class="STYLE10">&nbsp;收件人:</td>
<td> <input type="text" name="msg_to"size="77" maxlength="20"value=""></td>
<tr>
<td width="70" height="30" class="STYLE10">&nbsp;主 题 :</td>
<td> <input type="text"name="msg_topic"size="77"value=""></td>
</tr>
<tr valign="top">
  <td width="70" height="125" valign="middle" class="STYLE10">&nbsp;内 容 :</td>
    <td height="194"valign="middle"><textarea name="msg_words"rows="12"cols="77"></textarea></td>
</tr>
<tr>
<td colspan="2"height="50">
<span class="STYLE15"><strong>&nbsp;说明:</strong><br>
&nbsp;①每条信息中标题最多容纳50个字符,内容最多容纳1000个字符<br>
&nbsp;②将你所要发给的用户的名称加在收件人一栏中<br>
&nbsp;③还没想好</span></td>
</tr>
<tr>
<td align="center" colspan="2" bgcolor="#CCCCCC">
<input name="Submit" type="submit" id="Submit1" onClick="check('sent')" value="发送" >
<input type= reset name= cb_reset value=清除>
<input name="Submit" type="submit" id="Submit2" onClick="check('save')" value="暂存" >
<input type=button name="CloseButton" value="关闭" onClick="window.close()"></td>
</tr>
</table>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?