upload.jsp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%
  3. String path = request.getContextPath();
  4. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  5. %>
  6. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  7. <html>
  8. <head>
  9. <meta http-equiv="pragma" content="no-cache">
  10. <meta http-equiv="cache-control" content="no-cache">
  11. <meta http-equiv="expires" content="0">
  12. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  13. <meta http-equiv="description" content="This is my page">
  14. <link rel="stylesheet" type="text/css" href="<%=path %>/css/base.css" />
  15. <script language="javascript">
  16. function check()
  17. {
  18. if(document.formAdd.fujian.value=="")
  19. {
  20. alert("请选择文件");
  21. return false;
  22. }
  23. return true;
  24. }
  25. </script>
  26. </head>
  27. <body>
  28. <form action="<%=path %>/upload/upload_re.jsp" name="formAdd" method="post" enctype="multipart/form-data">
  29. <input type="file" name="fujian" id="fujian" onKeyDown="javascript:alert('此信息不能手动输入');return false;" />
  30. <input type="submit" value="提交" onclick="return check()"/>
  31. </form>
  32. </body>
  33. </html>