uploadify is a good jquery upload plugin from abroad, the main function is to upload files in bulk, with progress display.
Includes two versions, one of which is flash and the other is HTML5. The following describes how the flash version is used
1. Download Uploadify Zip
2. Unzip the package and upload the following files to a folder on your website:
Jquery.uploadify.min.js
Uploadify.css
Uploadify-cancel.png
uploadify.swf
3. Do not forget to introduce the jquery library when you use the Uploadify page
4. Introduce the following file on the page
<script type= "Text/javascript" src= "uploadify/jquery-1.8.0.min.js" ></script><script type= "text/ JavaScript "src=" uploadify/jquery.uploadify.min.js "></script><link rel=" stylesheet "type=" Text/css " href= "Uploadify/uploadify.css" >
5. Add file input to the page
<input type= "File" Name= "File_upload" id= "File_upload"/>
6. Initialize Uploadify
$ (function () { $ (' #file_upload '). Uploadify ({ ' swf ' : ' uploadify.swf ', ' uploader ': ' Fileuploadaction.action ' //Put your options here });
7. The final page should look like this
<%@ page language= "java" import= "java.util.*" pageencoding= "Utf-8"%><! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >
For more uploadify properties please refer to http://www.uploadify.com/documentation/
Process upload file action omitted, need to download source: Download
Effect
Itmyhome
Uploadify struts2 Implement image upload