📄 humanfile_reupload.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>图片或附件上传</title>
<link rel="stylesheet" type="text/css" href="/hr/css/human.css">
</head>
<script type="text/javascript" src="/hr/js/share/share.js"></script>
<body>
<logic:empty name="humanId">
<jsp:forward page="/human.do?method=toLoadOptions"></jsp:forward>
</logic:empty>
<logic:notEmpty name="humanId">
<form action="" method="post" enctype="multipart/form-data">
<table width="100%" cellpadding="0" cellspacing="0" border="1px"
class="contentBg">
<colgroup align="right" />
<colgroup align="left" />
<tr>
<td colspan="2" align="left">
<font color="blue"><b> 您正在做的业务是: </b>人力资源--人力资源档案管理--人力资源档案变更</font>
<br />
<br />
</td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td width="50%">
如需上传附件,请选择上传(word文档、txt文档、pdf文档、jpg图片等,最大5.0MB)
</td>
<td>
<input type="file" name="humanPictures" id="humanPictures"
style="border: 1px solid gray; width: 200px;" />
</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input style="width: 80px;" type="button" value="上传图片"
onclick="upload(this)">
<input style="width: 80px;" type="button" value="上传附件"
onclick="upload(this)">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</td>
</tr>
</table>
${msg}
</form>
</logic:notEmpty>
</body>
</html>
<script type="text/javascript">
<!--
function upload(obj){
var file = document.getElementById("humanPictures").value;
if(file.replace(/\s*/,"") == ""){
alert("您还没有选择文件...");
return;
}
var postfix = file.substring(file.lastIndexOf('.')+1).toLowerCase();
if(obj.value=="上传图片"){
if(postfix != "jpg" && postfix != "gif" ){
alert("不好意思,暂时只支持jpg和gif格式的图片!");
return;
}
document.forms[0].action = "human.do?method=doReupload&humanId=${humanId}&type=1";
document.forms[0].submit();
}else{
if(postfix != "doc" && postfix != "txt" && postfix != "pdf"){
alert("暂时只支持doc、txt和pdf格式的附件!");
return;
}
document.forms[0].action = "human.do?method=doReupload&humanId=${humanId}&type=2";
document.forms[0].submit();
}
}
//-->
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -