Some people say that jQuery can make js programming very elegant and I have never believed it, because I have always used prototype development.
I learned about jQuery today and it seems that it can really be elegant.
// If you want to publish this article, please indicate the exit, no outgoing copyright notice, I do not like to see this kind of website. My work website does not indicate the person who is serving Seven {See7di # Gmail.com}
Use the get method to send data to test. php: Two response data records at the same time. The response function shows the outbound content of the server. The php client uses $ _ GET ["name"] to obtain the response data.
$. Get ("test. php", {name: "John1", time: "2"}, function (msg ){
Alert ("Data Saved:" + msg );
});
Use the post method to send data to test. php: Two response data records at the same time. The response function shows the outbound content of the server. The php client uses $ _ POST ["name"] to obtain the response data.
$. Post ("test. php", {name: "John2", time: "2"}, function (msg ){
Alert ("Data Saved:" + msg );
});
Use the post method to send data to test. php: Two response data records at the same time. The response function shows the outbound content of the server. The php client uses $ _ POST ["name"] to obtain the response data.
$. Ajax ({
Type: "POST ",
Url: "test. php ",
Data: "name = Jing & location = Boston ",
Success: function (msg ){
Alert ("Data Saved:" + msg );
}
});
Load JSON data using http get requests
$. GetJSON ("test. php? Name = Jing 1 & location = Boston ", function (data ){
Alert ("Data Saved:" + data );
});
Load and execute a JavaScript file through an http get request
$. GetScript ("custom. js", function (data ){
Alert ("Data Saved:" + data );
});