⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 forward.jsp

📁 一个实现邮件收发功能的客户端程序
💻 JSP
📖 第 1 页 / 共 2 页
字号:
		EditForm.text.value = '<html>'+source+'</html>';
	}
	else
		EditForm.text.value = EditForm.richedit.value;
		//	alert(EditForm.text.value);
	if(typeof EditForm.fileName !="undefined") {
		var obj=EditForm.fileName;
		var names="";
		if(obj.length>1) {
			for(var i=0;i<obj.length;i++) {
				if(names=="") {
					names=obj[i].value;
				}
				else {
					names=names+","+obj[i].value;
				}
			}
		}
		else {
			names=obj.value;
		}
		EditForm.files.value=names;
	}
	//alert(EditForm.files.value);
	return true;
}
function praseScript(reMsg) {
	reMsg=reMsg.replace(/script/gi,"script$1");
	//reMsg=reMsg.replace(/on/gi,"On$1");
	return reMsg;
}
var fileCount=1;
function addRow(objTable){
	//var firstRow=" <tr><td width=\"60\">附 件 : </td><td><input type=\"file" name=\"file0\"></td></tr>";
	var tbodyOnlineEdit=objTable.getElementsByTagName("TBODY")[0];
	if(typeof tbodyOnlineEdit.children[0]=="undefined" || tbodyOnlineEdit.children[0]== null) {
		var tr=document.createElement("TR");
		tr.id="dataRow0";
		var td1=document.createElement("TD");
		td1.style.width="60";
		td1.innerText="附 件 : ";
		var td2=document.createElement("TD");
		td2.innerHTML="<input type=\"file\" name=\"file0\" class=\"inputbox\"><a href=\"#\" onClick=\"deleteRow(attachTable,this.parentElement.parentElement.id);\">删除附件</a>";
		tr.appendChild(td1);
		tr.appendChild(td2);
		tbodyOnlineEdit.appendChild(tr);
	}
	else {
		var elm = tbodyOnlineEdit.children[0].cloneNode(true);

		elm.id="dataRow"+fileCount++;//设置行的ID 
		//设置表单name 
		elm.children[1].children[0].name="file"+fileCount;

		// elm.children[2].children[0].name="amountT"+countId;
		//插入表单
		tbodyOnlineEdit.insertBefore(elm);
	}
}
function deleteRow(objTable,rowid){
	var tbodyOnlineEdit=objTable.getElementsByTagName("TBODY")[0];
	if(rowid!="") {
	for (var i=tbodyOnlineEdit.children.length-1; i>=0 ;i-- )
		if (tbodyOnlineEdit.children[i].id==rowid)tbodyOnlineEdit.deleteRow(i);
	}
}
function delFile(ids) {
	for(var i=0;i<trFiles.children.length;i++) {
		if(trFiles.children[i].id==ids) {
			trFiles.deleteCell(i);
		}
	}
}
//-->
</script>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" scroll="AUTO">
  <table width="100%" height="100%"  border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="11" background="images/1.gif">&nbsp;</td>
      <td align="center" valign="top" bgcolor="ECF4F5">
          <table width="100%" border="0" >
            <form  method="post" enctype="multipart/form-data" name="EditForm"  id="EditForm"  action="save.jsp">
			<input type="hidden" name="easyJWebCommand" value="save">
			<input type="hidden" name="subCommand" value="">
			<input name="editMode" type="hidden" id="editMode" value="<%=editMode%>">
            <input name="text" type="hidden" id="text" value="">
			<input name="cid" type="hidden" value="<%=cid%>">
			<input name="box" type="hidden" value="<%=box%>">
			<input type="hidden" name="files" value="">
              <tr>
                <td ><table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr align="center"> 
                    <td width="200" align="center" colspan="2"><font color="#FF0000">收件人、抄送人地址请用逗号隔开</font></td>
                    <td width="50" class="coolbutton" style="cursor: hand;" onClick="doSend()"><img  src="images/posts.gif" width="16" height="16" border="0" align="absmiddle">发送</td>
                    <td width="20"></td>
                    <td width="50" class="coolbutton" style="cursor: hand;" onClick="return doSave();"><img  src="images/copyToDisk0a.gif" width="16" height="16" border="0" align="absmiddle">保存</td>
                    <td width="20"></td>
                    <td width="90" class="coolbutton" style="cursor: hand;" onClick="doSendAndSave();"><img  src="images/mail.gif" width="16" height="16" border="0" align="absmiddle">发送并保存</td>
                    <td class="coolbutton" style="cursor: hand;" onClick="history.back();" nowrap><img src='images/exit.gif' width='20' height='18' border='0' align='absmiddle'>返回</td>
                  </tr>
                  <tr> 
                    <td colspan="1" width="10%" align="center" nowrap class="coolbutton" style="cursor: hand;" onClick="choiceAddress(EditForm.toUser);">收件人:</td>
                    <td colspan="7" width="90%"><input name="toUser" type="text" class="Max1 inputbox" id="toUser" value="<%=toUser%>"></td>
                  </tr>
                  <tr> 
                    <td colspan="1" width="10%" align="center" class="coolbutton" style="cursor: hand;" onClick="choiceAddress(EditForm.copyTo);">抄&nbsp;&nbsp;送:</td>
                    <td colspan="7" width="90%"><input name="copyTo" type="text" class="Max1 inputbox" id="copyTo" value="<%=copyTo%>"></td>
                  </tr>
				    <tr> 
                    <td colspan="1" width="10%" align="center" class="coolbutton" style="cursor: hand;" onClick="choiceAddress(EditForm.secretTo);">暗&nbsp;&nbsp;送:</td>
                    <td colspan="7" width="90%"><input name="secretTo" type="text" class="Max1 inputbox" id="secretTo" value="<%=secretTo%>"></td>
                  </tr>
                  <tr> 
                    <td colspan="1" width="10%" align="center">主&nbsp;&nbsp;题:</td>
                    <td colspan="7" width="90%"><input name="subject" type="text" class="Max1 inputbox" id="subject" value="<%=subject%>"></td>
                  </tr>
                  <tr> 
                    <td width="10%" align="center">优先级:</td>
                    <td><select name="priority" id="priority" >
                        <option value="3" >一般</option>
                        <option value="1" >高</option>
                        <option value="5" >低</option>
                      </select></td>
                    <td colspan="2">需要已接收回执
                      <input type="checkbox" name="needAutoReply" id="needAutoReply" value="1"></td>
                    <td colspan="2">&nbsp;</td>
                    <td align="center" colspan="2"><a href="#" target="_self" onClick="changeEdit(this);"><%=editModeTitle%></a></td>
                  </tr>
                  <tr id="htmlView" style="display:<%=htmlView%>"> 
                    <td colspan="8" width="100%"><iframe id='htmlRichedit' name='htmlRichedit' width="100%" height="350" src="include/inedit.htm"></iframe>
                    <span id="htmlTempSpan" style="display:none"></span></td>
                  </tr>
                  <tr id="textView" style="display:<%=textView%>"> 
                    <td colspan="8" width="100%"><textarea id='richedit' name='richedit' cols="82" rows="19" maxlength="1000000" class="Max2 textbox"><%=text%></textarea></td>
                  </tr>
                  <tr> 
                    <td colspan="8" width="100%">
					<table width="100%" border="0" id="attachTable">
					<tbody>
                        <tr id="dataRow0"> 
                          <td width="60">附 件 : </td>
                          <td><input type="file" name="file0" class="inputbox">
                              <a href="#" onClick="deleteRow(attachTable,this.parentElement.parentElement.id);">删除附件</a></td>
                        </tr>
						</tbody>
                      </table>
					</td>
                  </tr>
                  <tr>
                    <td colspan="8">
                      <input name="addAccessory" type="button" class="inputbtn" id="addAccessory" value="添加附件" onClick="addRow(attachTable);">
                      提示:您能发送的邮件附件总容量最大为25M! </td>
                  </tr>
				  <%if(hasAttachs){%>
                  <tr>
                    <td colspan="8">当前已有<%=attachs.size()%>附件:
					<div class="divFiles">
					<TABLE border=0 cellSpacing=0 cellPadding=0>
					<TBODY>
					<TR id="trFiles">
					<%for(int i=0;i<attachs.size();i++) {
						java.util.Map info=(java.util.Map)attachs.get(i);
						//out.println(info.get("description")+"("+info.get("size")+")"+" &nbsp;&nbsp;");%>
						<TD class="trnormal" onmouseover="this.className='trselect'" onmouseout="this.className='trnormal'" id="td<%=i%>">
						<img src="images/<%=info.get("img")%>" width="24" height="24" border="0" align="absmiddle" title="<%=info.get("description")%>"><%=info.get("fileName")+"("+info.get("size")+")"%><br/><a href="download.jsp?cid=<%=cid%>&box=<%=box%>&fileName=<%=common.Function.encode((String)info.get("fileName"))%>" target="_blank">下载</a>&nbsp;&nbsp;<a href="javascript:delFile('td<%=i%>')">删除</a>
						<input type="hidden" name="fileName" value="<%=info.get("fileName")%>">
						</TD>
						<%
					}
					%>
					</TR></TBODY></TABLE>
					</div>
                      </td>
                  </tr>
				  <%}%>
                  <tr>
                    <td colspan="8">&nbsp;</td>
                  </tr>
                </table></td>
              </tr>
            </form>
      </table></td>
      <td width="11" bgcolor="ECF4F5">&nbsp;</td>
    </tr>
  </table>
<script language="javascript">
if(EditForm.editMode.value!=''&&EditForm.editMode.value=='html')
{
	window.setTimeout('eee()',500);
}
function eee()
{
	if(EditForm.editMode.value!=''&&EditForm.editMode.value=='html')
	{
		htmlRichedit.setHTML(EditForm.richedit.value);
	}
}
window.setTimeout('document.all("toUser").focus()',1);
</script>
</body>
</html>

⌨️ 快捷键说明

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