Page scroll to bottom auto Ajax get article
The code is as follows
Copy Code
var _timer = {};function delay_till_last (ID, FN, wait) {if (_timer[id]) {Window.cleartimeout (_timer[id]);Delete _timer[id];}return _timer[id]
Let's go straight to the example, crap don't say much.
Html
The code is as follows
Copy Code
message Message Board your Name Your name email e-Mail message fill in your message send send out
JavaScript Ajax
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
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,
Ajax
The word Ajax is no stranger to web developers, and now it's probably about the following points:
• No refresh change page data
• Asynchronous communication
$.ajax, $.get, $.post
Asynchronous Javascript and XML
•...
Ajax is an
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,
The solution is to use the encodeURI function of JS to encode the parameters passed.
The code is as follows
Copy Code
var Keywords=encodeuri (document.getElementById ("Suggestfilm"). Value);
Cases
Function $ (elementid) { //Gets the object if for the specified ID (document.getElementById) { return document.getElementById (ElementID); } else if (document.all) { return document.all[elementid]; } else if (document.layers) { return
Ajax asynchronous data Operation detailed
Ajax is all called "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), a Web development technology that creates interactive Web applications.
Mainly includes the following technologies:
The code is as follows
Copy Code
function Showhint (str){var xmlhttp;if (str.length==0){document.getElementById ("Txthint"). Innerhtml= "Sorry, your username cannot be empty";Return}if (window. XMLHttpRequest){//code for ie7+,
Method One,
The parameter type is changed from Get to postAdd parameter cache and set to FalseAdd Time stamp
The code is as follows
Copy Code
$.ajax ({URL: ' Ios/index ',Cache:false,Type: ' Post ',Data: {Timestamp:new
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: "
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