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

📄 upload.jsp

📁 file upload have a good using function
💻 JSP
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" errorPage="" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>上传页面</title>
<script language="javascript">
function uploadBegin(){
	theFeats = "height=200,width=320,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no";
	strAppVersion = navigator.appVersion;
	if (document.uploadForm.file1.value != "")
	{
	    if (strAppVersion.indexOf('MSIE') != -1 && strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4)
	    {	
			winstyle = "dialogWidth=320px; dialogHeight:200px; center:yes";
			window.showModelessDialog(<%="\""+response.encodeURL("progressbar.jsp")+"\""%>,window,winstyle);
	    }
	}
}
</script>
</head>

<body leftmargin="0" topmargin="0">
<p>上传进度显示测试</p>
<form action=<%="\""+response.encodeURL("receive.jsp")+"\""%> enctype="multipart/form-data" method="post" name="uploadForm" id="uploadForm" onsubmit="uploadBegin();">
    <input type="file" name="file1" maxlength="100">
    <input type="file" name="file2" maxlength="100">
    <input type="submit"  name="submit" value="开始上传">
</form>
</body>
</html>

⌨️ 快捷键说明

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