Related articles: PHP JSON data creation and resolution program codeJSONP (JSON with Padding) is an unofficial protocol that allows the server-side integration script tags to be returned to the client and Cross-domain access through JavaScript
The following code implementation AJAX is submitting effect: Loading ....
Onchange= "Selecte (this.options[this.options.selectedindex].value)" >
Please select
CssRain1
CssRain2
CssRain3
CssRain4
You chose Region 2.
This method is more go, common have the following several;The full page Refresh method is described below: sometimes you might useWindow.location.reload () refreshes the current page.Parent.location.reload () Refreshes the Father object (for
Ajax frameworks are a collection of modular Ajax capabilities that can be implemented in a variety of languages (such as Sajax with a variety of language implementations), and Ajax is just one part of jquery,
Instance 1
The code is as
Because I've been groping for jquery Ajax before, but the actual project but use less, began to think that will not encounter a lot of problems, the results of my headache oh, big and small problems, let me have to hit the mouse problem (the idea of
I use the Myeclips Tutorial e tool with the function of import jar, the default this jsonplugin has been imported, so only need to see in MyEclipse, is not already imported this package, if already have, then do not have to import.
Okay,
The code is as follows
Copy Code
Add Async:false. That is, modify to sync//function Vcodeyes () {var bol = false;$.ajax ({Type: "Get",URL: ".. /ajax/validationcode.ashx ",Data: {txtvcode: $ (' # '). Val
Ajax-Level Linkage menu code
Big class 1 Big class 2
Header ("CONTENT-TYPE:TEXT/HTML;CHARSET=GBK")//output encoding to avoid Chinese garbled$pid =$_get[' pid '];
$db =mysql_connect ("localhost", "root", "7529639"); Creating a database
For Ajax, the core object is XMLHttpRequest, all AJAX operations are inseparable from the operation of this object.Creating XMLHttpRequest ObjectsFor IE browsers:
The code is as follows
Copy Code
XmlHttp = new
insert title here name Sex Home Address
JSON file:
[
{
"Name": "Xujun",
"Sex": "Male",
"Home": "Nanjing"
},
{
"Name": "Jack",
"Sex": "Male",
"Home": "Beijing"
}
]
The $.ajax of this method, inside the datatype:
IE and opera support for Ajax are good. (Thanks to Prototype.js's encapsulation)
This example uses a file to record the chat record and realize the simple chat room
The actual use needs to pay attention to the processing of large user concurrency,
Ajax in the operation of the DOM depressed for several days, today finally understand, self-study is bitter ah, bitter a runny nose a tear, the lesson to come out, give a wake up, veteran will not look.
The operation of XML in 1.DOM does not mix
$.ajax () This is the underlying AJAX implementation of jquery. Simple and easy-to-use high-level implementation see $.get, $.post, etc.
Here are a few Ajax event parameters: Beforesend, Success, complete, error. We can define these events to deal
Simple HTML code, saving ajax.html. The code is as follows:Copy code ); return false; "> View all Reference jquery. js and date. F-0.5.0.js (json date conversion) The code is as follows:Copy code Function ViewMsg (id ){$. Ajax ({Type: "
This problem is always plagued during the process of making this BLOG .... There are three methods to make a big difference:1. Each time the client interacts with the server, it must change the URL value. In this way, IE will record the historical
Pass Chinese parameters, and then modify the database tutorial. The code is as follows:Copy code The parameter is Chinese. encodeuricomponent. This method must be called twice.*/Function utf8rawurldecode ($ source ){$ Decodedstr = "";$ Pos = 0;$
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