Home > Web Front-end > JS Tutorial > Detailed explanation of image upload plug-in jquery.uploadify_javascript skills

Detailed explanation of image upload plug-in jquery.uploadify_javascript skills

WBOY
Release: 2016-05-16 17:15:09
Original
1148 people have browsed it

1. js code:

Copy code The code is as follows:



2. Things to note

(1) If the "BROWSE" button is not displayed on the page, it means that your 'uploader': '<%=basePath%>images/uploadify.swf' configuration is incorrect. Check whether the path is correct.

(2) If you need to modify the button image: you can use the 'buttonImg' configuration to replace it

(3) After the upload is completed, the 'onComplete' event is not triggered: after the background servlet is processed, 1 must be output to the page, otherwise the onComplete callback function of the page will not be executed. response.getWriter().write(1);

(4). If the name of the image is changed when the background servlet processes the upload, its value cannot be obtained through fileObj. Instead, the new file name must be output by the background servlet: out.print(filename); on the jsp page Use response accordingly to get the new value.

(5), Image preview implementation:

Add an to the jsp page, and when the upload is completed, modify the src value of img in the onComplete event.

3. Download address
http://www.uploadify.com/download/

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template