upload.jsp
上传用户:itkeji
上传日期:2017-12-04
资源大小:6184k
文件大小:3k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page language="java" pageEncoding="UTF-8"%>
  2. <%@ taglib prefix="ww" uri="/webwork" %>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" >
  5. <head>
  6. <title>SWFUpload Demos - Simple Demo</title>
  7. <link href="css/default.css" rel="stylesheet" type="text/css" />
  8. <script type="text/javascript" src="js/swfupload.js"></script>
  9. <script type="text/javascript" src="js/swfupload.queue.js"></script>
  10. <script type="text/javascript" src="js/fileprogress.js"></script>
  11. <script type="text/javascript" src="js/handlers.js"></script>
  12. <script type="text/javascript">
  13. var swfu;
  14. window.onload = function() {
  15. var settings = {
  16. flash_url : "js/swfupload.swf",
  17. upload_url: "uploadFilesAction.action",
  18. post_params: {"PHPSESSID" : "<?php echo session_id(); ?>"},
  19. file_size_limit : "100 MB",
  20. file_types : "*.*",
  21. file_types_description : "All Files",
  22. file_upload_limit : 100,
  23. file_queue_limit : 0,
  24. file_post_name:"attachment",//加了这个,在webwork的action中要用
  25. custom_settings : {
  26. progressTarget : "fsUploadProgress",
  27. cancelButtonId : "btnCancel"
  28. },
  29. debug: false,
  30. // Button settings
  31. button_image_url: "images/TestImageNoText_65x29.png",
  32. button_width: "65",
  33. button_height: "29",
  34. button_placeholder_id: "spanButtonPlaceHolder",
  35. button_text: '<span class="theFont">浏览</span>',
  36. button_text_style: ".theFont { font-size: 16; }",
  37. button_text_left_padding: 12,
  38. button_text_top_padding: 3,
  39. // The event handler functions are defined in handlers.js
  40. file_queued_handler : fileQueued,
  41. file_queue_error_handler : fileQueueError,
  42. file_dialog_complete_handler : fileDialogComplete,
  43. upload_start_handler : uploadStart,
  44. upload_progress_handler : uploadProgress,
  45. upload_error_handler : uploadError,
  46. upload_success_handler : uploadSuccess,
  47. upload_complete_handler : uploadComplete,
  48. queue_complete_handler : queueComplete // Queue plugin event
  49. };
  50. swfu = new SWFUpload(settings);
  51.      };
  52. </script>
  53. </head>
  54. <body>
  55. <div id="header">
  56. <h1 id="logo"><a href="../">SWFUpload</a></h1>
  57. <div id="version">v2.2.0</div>
  58. </div>
  59. <div id="content">
  60. <h2>Simple Demo</h2>
  61. <form id="form1" action="" method="post" enctype="multipart/form-data">
  62. <p>This page demonstrates a simple usage of SWFUpload.  It uses the Queue Plugin to simplify uploading or cancelling all queued files.</p>
  63. <div class="fieldset flash" id="fsUploadProgress">
  64. <span class="legend">Upload Queue</span>
  65. </div>
  66. <div id="divStatus">0 Files Uploaded</div>
  67. <div>
  68. <span id="spanButtonPlaceHolder"></span>
  69. <input id="btnCancel" type="button" value="Cancel All Uploads" onclick="swfu.cancelQueue();" disabled="disabled" style="margin-left: 2px; font-size: 8pt; height: 29px;" />
  70. </div>
  71. </form>
  72. </div>
  73. </body>
  74. </html>