JQuery plugin AjaxFileUpload implements ajax file upload and jqueryajax upload plugin

Source: Internet
Author: User

JQuery plugin AjaxFileUpload implements ajax file upload and jqueryajax upload plugin

This article provides examples to share with you the specific code of AjaxFileUpload for file upload. The specific content is as follows:

The jQuery plug-in AjaxFileUpload is used to upload ajax files. This plug-in is very simple to use. Next I will write a demo to demonstrate how to use the AjaxFileUpload plug-in to upload files.

1. Introduce js related to the AjaxFileUpload plug-in

Copy codeThe Code is as follows: <script type = "text/javascript" src = "<% = basePath %> resources/js/jquery-1.2.1.js"> </script>
<Script type = "text/javascript" src = "<% = basePath %> resources/js/ajaxfileupload. js"> </script>
Note: The test shows that ajaxfileupload has requirements for the jQuery version. in use, ajaxfileupload must be consistent with the js version corresponding to jQuery. Otherwise, an exception may occur. You can download it from the official website of ajaxfileupload, avoid version conflicts.

2. Code for implementing the upload function

<% @ Page language = "java" import = "java. util. * "pageEncoding =" UTF-8 "%> <% @ include file ="/base. jsp "%> <% String path = request. getContextPath (); String basePath = request. getScheme () + ": //" + request. getServerName () + ":" + request. getServerPort () + path + "/"; %> <! Doctype html public "-// W3C // dtd html 4.01 Transitional // EN"> 

The above is all the content of this article, and I hope it will help you learn jquery programming.

Related Article

Cloud Intelligence Leading the Digital Future

Alibaba Cloud ACtivate Online Conference, Nov. 20th & 21st, 2019 (UTC+08)

Register Now >

Starter Package

SSD Cloud server and data transfer for only $2.50 a month

Get Started >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.