Buffalo is the AJAX framework developed by our countrymen
It enables users to invoke methods in Java code in JS.
Configuration method:
1. The relevant servlet is configured in Web.xml as follows:
Xmlns= "HTTP://JAVA.SUN.COM/XML/NS/J2EE"Xmlns:xsi=
A screenshot of an Ajax method in the actual combat project
Knowledge Point One: jquery initializes the page mode.
Knowledge Point two: jquery traversal data Way
For In loop:
For In loop for
(x in Obj.bkdata) {
//x representation
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
The ReadyState property consists of five possible values:0: (uninitialized) The Send method has not yet been invoked1: (in load) the Send method has been invoked and the request is still being processed2: (loaded) The Send method is complete and the
Introduction to Ajax
Time: 2005-11-01Author: David TeareNumber of Views: 5518This article keywords: ajax, DHTML, DWR, JavaScript
Article Toolsrecommend to a friend Print Article
2. Previous paragraph page code
zhangsan
lisi
3.javabean--person
public class Person {
private int id;
private String name;
private int age;
Private String address;
public int getId () {return
ID;
}
public void setId (
··········· Because the case is done using MVC, the code directly attached to it is the same principle, whether it's aspx, ashx, or WebService.
Html:
@{Layout = null;}Index
Controller:
Using System;Using System.Collections.Generic;Using System.
ajax-load ()
Use the load () method to load the data from the server through an AJAX request and place the returned data in the specified element in the format: URL, network request address, data, optional parameter, callback, and the callback
JQuery offers load,$.get,$.post three ways to make Ajax easier to write, and it's a complex task that is no longer complicated.The Load method is the simplest and most commonly used Ajax method in jquery to load remote HTML code into the DOM, which
Get and POST requests are different:
1, to the server to pass the amount of data:
Get up to 2k
Post is not limited in principle, php.ini is limited to 8m
2, the transmission of data in a different form:
Get passes parameters in the form of a request
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
FileUpload is a jquery ajax file upload Plugin
Download down a lot of things, a lot of is not necessary, here only to talk about the minimum level of application
First, rely on JS:
copy Code is integral (Jquery.ui.wiget.js does not need to
Features:
1. Realize the user registration function;2. Implementing an existing user name cannot be registered;3. User name, password non-null authentication;4. Password confirmation; User Registration Interface register.html
user registration
The Background code is as follows:
/** * Method Description: Check whether the case information conforms to the filing standard * */@RequestMapping (value = "/checklianlist.action") @ResponseBody public Strin
G Checklianlist
has just completed a feature that jams today. In short, it is a delete operation that implements a checkbox multi-select value. I'm so busy that I finally got it done. JS as follows: (please leave a message if you do not understand)function All_del (
This article implements the partial refresh of Ajax. Ideas are as follows:
First of all From the JSP page a.jsp to the server to initiate an AJAX request, by the action method MethodA processing, the MethodA method of data assembly, the return of 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