Jquery's ajaxSubmit () asynchronously uploads images and saves form data. Demo code _ jquery

Source: Internet
Author: User
Use jquery's ajaxSubmit () to asynchronously upload images to save form data. The Demo code is as follows. If you are interested, refer to the following code and hope to help you (jsp needs to be introduced: jquery-1.9.0.js, jquery. form. js), jsp pages are produced by bootstrap, and you don't need to worry about the labels you don't understand. form forms are similar. The code is simple, just to demonstrate how to use ajaxSubmit to asynchronously upload images and save data. Please include it!
(References: http://www.jb51.net/shouce/jquery/jquery_api/Plugins/Form/ajaxSubmit.html)
I. web (add. jsp)

The Code is as follows:


<% @ Page import = "com. fingerknow. project. vo. UserInformation" %>
<% @ Page language = "java" contentType = "text/html; charset = UTF-8"
PageEncoding = "UTF-8" %>
<% @ Taglib uri = "http://java.sun.com/jsp/jstl/core" prefix = "c" %>





Registered business area








<%
Response. setCharacterEncoding ("UTF-8"); // This is the encoding method.
Response. setContentType ("text/html"); // set the webpage type as text code
UserInformation user = null;
String username = "";
Integer userId = null;
If (request. getSession (). getAttribute ("userinfo ")! = Null ){
User = (UserInformation) request. getSession (). getAttribute ("userinfo ");
Username = user. getUsername ();
UserId = user. getUserId ();
} Else {
Username = "Please log on ";
}
%>






Largest Chinese shopping experience sharing platform


Homepage | help















Registered business area














©2012 fingerknow.com | privacy terms | Terms of Service | Guangdong ICP filing no. 12003619-1





Related Article

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.