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

Jsp/Servlet

开发平台:

Java

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