Jquery_review's jquery's ultimate ajax approach $.ajax ()

Source: Internet
Author: User

after the project is large and small there are many, the impression that many of the framework of low-level encapsulation method is based on the Ajax () method to expand. The AJAX approach can be said to be the originator of various AJAX-related methods provided by jquery, and all other methods, such as Load,get,post,getscript,getjson, are extended to the jquery.ajax approach.
The following is an actual demo that uses the above parameters once:

Front-end page code:

<%@ page language= "java" import= "java.util.*" pageencoding= "Utf-8"%><! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" >

Back-End Code:

@Overrideprotected void DoPost (HttpServletRequest req, HttpServletResponse resp) throws Servletexception, IOException { String name = Req.getparameter ("name"); String address = Req.getparameter ("Address"); StringBuffer sb = new StringBuffer (""); Sb.append ("{\" name\ ": \" ")  . Append (name)  . Append (" _czz\ ", \" Address\ " : \ "")  . Append (address).  Append ("_czz\"} "); Resp.getwriter (). Print (sb.tostring ());}

In fact, the best information of jquery is the official document, which has all the detailed content, the weekend happy!


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.