When a POST request is sent to the server and the form is input in Chinese, garbled characters often occur.
Solution: Add the following to the servlet that receives the request:Code:
Request. setcharacterencoding ("UTF-8 ");
For post
// For one instance, three textbox. When the user inputs data in the first and second, the third textbox changes accordingly.
Javascript section:
Create an XMLHTTPRequest object
XMLHTTP = new activexobject ("mcrosoft. XMLHTTP"); // IE
XMLHTTP =
Because repeater is used, I Don't Know How To paging, so I am too lazy to writeCodeSo I found and found a bunch of stuff on the Internet.
1. Add an aspnetpage reference. read this article.ArticleHttp://www.cnblogs.com/seaven/archive/2009/03/19/12999
Debugging Ajax in IE
For ie9 and F12 tool, you can debug Ajax...
But I'm ie8 ..
Firebug, I heard that this debugging is good. After I download and install it, the root page cannot run JS under ff. It seems that JS compatibility is poor and I have
The Web mode is displayed:
Page code:
No title page . bgcss { background-color: Gray; filter: alpha (opacity = 70); opacity: 0.7; } --> reading surfing the Internet wash clothes play out
Index. jsp
check.html --> var http_request = false; function send_request (URL) {// initialization, specify the processing function, and send the request function http_request = false; // start to initialize the
In ie, the Select drop-down list box cannot be rendered using innerhtml .. Therefore, oselect cannot be used. innerhtml = text
var XMLHTTP; function createxmlhttprequest () { If (window. XMLHttpRequest) { XMLHTTP = new XMLHttpRequest (); }
This article is similar to the previous article, except that XMLHttpRequest is used to asynchronously send post requests to the server.
Except for the register. jsp file, all the other three files remain unchanged.
Register. jsp:
Insert title
When you access Google or Baidu, if you want to search for "Avatar", you may only need to enter the word "a" and the website will automatically match some phrases for us to choose from, this design is very user-friendly. Today we will give a brief
Ajax automatically completes the question in the drop-down prompt box
Http://bbs.blueidea.com/thread-2691904-1-1.htmlHttp://www.cnblogs.com/jinchun/archive/2007/03/28/691145.html
Enter the following content: for example,Can be used only for the drop-
I have been searching for half a day on Baidu. No one answered such a question positively. Here I will share my experience.
How to Use the Ajax control cascadingdropdown to implement multi-level linkage binding.
There are many multi-level linkages
AJAX can obtain server data without refreshing a new page. However, due to the security restrictions of various browsers, Ajax is likely not to allow cross-origin access (this type of restriction is necessary. without any restriction, AJAX can use
In a recent project, the upload function uploads a CVS file, parses the file, and writes it to the database.Because it is often necessary to upload large files, it may take 40 minutes for the customer to complete this function. During this process,
When sending and receiving information in an asynchronous application, you can select plain text and XML as the data format. This phase of understanding Ajax discusses another useful data format, JavaScript Object Notation (JSON), and how to use it
My personal understanding is as follows !!!
1. Ajax is divided into page (front-end) and background processing (backend, Servlet );
2. Page: Create an XMLHTTPRequest object. The supported XMLHttpRequest objects are unavailable in different
Chinese garbled characters may occur when values are passed through URLs in JS. The solution is as follows:
Encodeuri is used twice when the value is passed, and urldecoder. Decode is used when receiving the value in the background.
Reference
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