XMLHttpRequest is the basis of Ajax. XMLHTTPRequest object All modern browsers support XMLHttpRequest objects (ie5 and IE6 use activexobject ). XMLHttpRequest is used to exchange data with the server in the background. This means that you can
The core of Ajax technology is the XMLHTTPRequest object (xhr ).XMLHTTPRequest objectCreate an xhr object in the browser as follows and use the XMLHttpRequest constructor.VaR xhr = new XMLHttpRequest ();Xhr usageXhr. Open ("get", "example. php",
The first sentence is written in this way: programmers are hard-pressed and will write blog posts in addition to development! Ah, today I will discuss with you the use of the Ajax auxiliary method actionlink. If there are some bad or wrong places,
Struts2 supports a stream type of result, which can directly respond to binary and text in the client browser,
We can generate a text response in the action, and then dynamically load the response on the client page.
Let's look at the
XMLHttpRequest introduction:
The XMLHTTPRequest object can be used to update webpages without submitting the entire page to the server. After all the pages are loaded, the client requests data from the server through this object. After the server
1. Do not forget to reference
Use the following code:
regist @ using (Ajax. beginform ("Add1", "student", new ajaxoptions () {confirm = "do you want to submit? ", Httpmethod =" Post ", insertionmode = insertionmode. insertafter,
"> my JSP 'index. JSP 'starting page get the CD Information
Ajaxloadxmlres. xml
empire burlesque Bob Dylan USA Columbia 10.90 1985 1 Zhang San hide your heart Bonnie Taylor UK CBS Records 9.90 1988
1. Another common JS expression:
VaR user = {inintevent: function () {$ ("input [name = 'user. user_logname'] "). unbind ("Blur");/* the user will respond when the input box is moved. user_logname is the name of the input box */$ ("input [name =
[Function description] We usually need to enter the user name when registering a website. However, if we enter the user name we like, we can leave the input box and sometimes remind you that the user name has been registered, however, other content
Atitit. Ajax best practices and framework Selection
1. Selection framework DWR/dwr3 and JQ 1
2. the convenience of DWR is divided into two parts. 1
3. Advantages of DWR: 1
4. Disadvantages: 2
5. Differences between root JQ 2
1. Selection
URL: String-type parameter (the current page address by default.
Type: a parameter of the string type. The request method (post or get) is get by default. Note other HTTP request methods, such as put and
Delete can also be used, but only some
Publish the common PAGE method as WebMethod and access it in Javascript format.
1. The method must be public static. The return type is preferably string.2. Add the [WebMethod] feature before the method.3. The Post method must be used for Client
1:
JSON (JavaScriptObject Notation) is a simple data format, which is lighter than xml. JSON is a JavaScript native format, which means that no special API or toolkit is required to process JSON data in JavaScript.JSON rules are simple: the object
To display data on other websites on your own page, you need to use Ajax to solve cross-origin problems,Solution: jQuery. support. cors = true; (the browser supports cross-origin access ),Instance:Copy codeThe Code is as follows:// The browser
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