If the transfer parameter is directly assigned, it will produce garbled!Http_request.open ("POST", url,true);Http_request.setrequestheader (' Content-type ', ' application/x-www-form-urlencoded ');Http_request.send ("action=" +strname+ "&val=" +val);
A. What is Ajax?
Ajax is "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), a Web development technology that creates interactive Web applications. You can communicate with the server without refreshing the page. 1.XMLHttpRequest
1
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=
Be afraid to forget later, as a note, the explanation is contained in the code. Note: The Jquery Ajax used here 1. Pass the basic data type
Useraction
Package action;
Import java.io.IOException;
Import java.sql.Connection;
Import
Or a small rookie of me, the first time to write a blog, forgive Oh ...
The problem bothered me for two days, but it was so easy to find out ...
(1) The requirement is this, I want to implement a function of inserting a chart, the properties of the
The blogger himself is developing a no backstage, only the front of the query system, encountered a difficulty, how to use Ajax to read their own local JSON file, Baidu, Google, found that most of the articles are said to modify browser parameters,
Web development is very convenient based on struts2, and can also easily implement the FileUpload function, here demonstrated struts2 in the case of multiple file form upload operation
Struts.xml Action Definition
ActionResult
jquery
There are three main solutions to the problem of Ajax cross-domain problems
1. Use the proxy to mount the Cross-domain address below the domain
2. Use Jsonp
3. Use Access-control-allow-origin response Head
The first solution needs to introduce
When you encounter the need to verify the existence of existing records in the database, you need to first use Ajax to submit the background action to determine whether there are records in the database, by returning JSON data, reception in 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
Recently want to use AJAX to achieve level three, but when the URL of the servlet, Xmlhttpreq.status returned 404, that is, the Servlet,url path error is not found.
This is how I configured it in Web. Xml.
AjaxServlet/dyList
var url =
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 perform an asynchronous refresh of a part of a page, after grabbing the packet, you can find that the problem is that if the contents of the form are unchanged, it does not make a request to the server, but instead caches the
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 first way to create XMLHttpRequesttry{Searchreq = new ActiveXObject (' msxml2.xmlhttp ');}catch (e) {try{Searchreq = new ActiveXObject (' microsoft.xmlhttp ');}catch (e) {try{Searchreq = new XMLHttpRequest ();}catch (E){}}}*/The second
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