writemail.jsp

来自「用java编的用到」· JSP 代码 · 共 105 行

JSP
105
字号
<%@ page language="java" pageEncoding="UTF-8"
	contentType="text/html; charset=UTF-8"%>
<%@ include file="/taglibs.inc.jsp" %>

<html>
<head>
<title>写信</title>
</head>

<body>
<form action="sendMail.do" enctype="multipart/form-data" method="post">
<script language="javascript">
	<!--
		function addContact(type) {
		   var vReturnValue = window.showModalDialog("goselect.jsp",window,"dialogWidth=800px;dialogHeight=600px");
		   var theform = document.forms[0];
		   
		   if (vReturnValue == undefined)
		   {
		   		vReturnValue = "";
		   }
		   
		   if (type=="to")
		   {
		      if (theform.txtTo.value=='')
		      {
		          theform.txtTo.value=vReturnValue;
		      }
		      else if (vReturnValue != "")
		      {
		      	  theform.txtTo.value += "," + vReturnValue;
		      }
		   }
		   else if (type=="cc")
		   {
		      if (theform.txtCC.value=='')
		      {
		          theform.txtCC.value=vReturnValue;
		      }
		      else if (vReturnValue != "")
		      {
		      	  theform.txtCC.value += "," + vReturnValue;
		      }
		   }
		   else
		   {
		      if (theform.txtBCC.value=='')
		      {
		          theform.txtBCC.value=vReturnValue;
		      }
		      else if (vReturnValue != "")
		      {
		      	  theform.txtBCC.value += "," + vReturnValue;
		      }
		   }
		   
		}
	// -->
</script>
<div align="center"> <strong>写信 </strong><br />
<table width="500" border="1">
  <tr>
    <td width="150">收信人</td>
    <td width="350">
      <c:if test="${groupMails != null }">
          <input type="text" name="txtTo" value="${groupMails}"/>
      </c:if>
      <c:if test="${groupMails == null }">
          <input type="text" name="txtTo" />
      </c:if>
      <input type="button" name="sbtAddTo" value="添加" onclick="addContact('to')"/></td>
  </tr>
  <tr>
    <td>抄送</td>
      <td><input type="text" name="txtCC" />
      <input type="button" name="sbtAddTo" value="添加" onclick="addContact('cc')"/></td>
    </tr>
  <tr>
    <td>密送</td>
      <td><input type="text" name="txtBCC" />
      <input type="button" name="sbtAddTo" value="添加" onclick="addContact('bcc')"/></td>
    </tr>
  <tr>
    <td>附件</td>
      <td><input type="file" name="fileAtt" /></td>
    </tr>
  <tr>
    <td>标题</td>
      <td><input type="text" name="txtTitle" /></td>
    </tr>
  <tr>
  <tr>
    <td>内容</td>
      <td><textarea name="txaContent" rows="5" cols="40"></textarea></td>
    </tr>
  <tr>
    <td colspan="2" align="center"><input type="submit" name="sbtSend" value="发送" />
      <input type="reset" name="Reset" value="重置" /></td>
    </tr>
  </table>
</div>
</form>
</body>
</html>

⌨️ 快捷键说明

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