On the Internet to find information, it is really tangled, patchwork, although this writing is very simple, but it cost me a lot of Kung Fu, in order to help the students behind, resolute paste code, hope for everyone useful.
Function Description:
We all know that CodeIgniter (CI) has a paging class library, and now we create an AJAX paging that we need based on its native class library.
First in the/application/libraries/directory to create a my_pagination.php, the code is as
Call the MVC deletion method, which is labeled "Httpdelete"
Ajax invocation, type is "delete"
In native debugging, the error 404 method could not be found
So the web.config modifications in the MVC Project are configured as follows:
Jquery+ajax+json+servlet Principle and Demo
Approximate process:
User Time Click, Trigger JS, set $.ajax, start request. The server responds, gets the value that Ajax passes, and then processes it. Returns to Ajax in JSON format. Ajax parses the
Two different ways
First, configure directly in the spring configuration file Applictioncontext
Second, separate dwr.xml file configuration
Test class:
Package com.test; public class Test {public string test (string name) {System.out.println ("---
Tree-type structure is a kind of data structure with very wide application. The genealogy of Clan and the organization form of modern enterprise in human society are all tree-shaped structure. In the field of computer, the management structure of
Ajax
It may be that you have just met the core object of Ajax, XMLHttpRequest, to think of XML in Ajax, and perhaps you're sure it's The X in Ajax, but in fact it has nothing to do with XML directly. It has a lot to do with its name, XMLHttpRequest,
The JavaScript code is as follows, as explained in comments:
var ajax = function (parameters) {/* * @description fetch data with Ajax. * @parameter {Object} Parameters data objects, properties are as follows: * @property {string} URL request
$.ajax () method parameters
1.url:Requires that the requested address be sent as a parameter of type string (the current page address is assumed to be the default).
2.type:A parameter of type string is required, and the request method (post or get)
The login submission form is verified and forwarded using the POST request;Enter user name (correct) and password (whether empty) to authenticate with GET request; 1. Login Screen and homepage
When using Ajax to pass data, the data is usually organized into Data= "Var1=abc&var2=def". When there is a plus (+) or connector (&) in the data, there is some data loss when the server receives the data.
Analyzing the format of the Ajax
One, the problem of Ajax redirection.
The default Ajax is not support redirection, because Ajax itself is a partial refresh, do not reload the page. If you need to use redirection, you can do this in the following ways:
The first step: back-end code
1. Introduction of the JAR package2. How to WriteProcessor method return value void @RequestMapping ("/first") public void Dofirst (HttpServletResponse response) throws IOException { //data to be returned to the browser list
Foreword: Recently, when writing a Java Web background, I adopted the Spring+mybatis+mysql method. Record the key issues that are encounteredinterface returns data-relatedreturn null after using @responsebody Description: just run the background,
1. Import the relevant jar package: Jackson-annotation-2.5.4.jar,jackson-core-2.5.4.jar,jackson-databind-2.5.4.jar.Related configurations in 2.spring-servlet.xml:Namespaces added in mvc:xmlns:mvc=
My back and forth, not the API, not the Ajax, I'm just here to discuss the HTML and backend combinationPrevious wordsOnce rage Dedecms believe that do the site of ten eight or nine know, there are some not technology-born people, by looking at
Ajax jump to the new jsp page, ajax jump to the jsp page
Ajax can be used to partially refresh the page, that is, to update the partial information of the page without refreshing the entire page.
A problem occurs in the project: When you click a
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