Phpajax paging _ PHP Tutorial

Source: Internet
Author: User
Phpajax paging 1. Ajax pagination phpaajax pagination javaajax pagination asp. netaajax pagination jqueryajax pagination jspajax without refreshing pagination aspaajax pagination ajax implement pagination ajaxjsp pagination ajax pagination use ajax pagination php ajax pagination java ajax pagination asp.net ajax pagination jquery ajax pagination jsp ajax without refreshing pagination asp ajax pagination ajax implement pagination ajax jsp pagination
Ajax paging uses the method of analyzing data on the client, then sending it to the PHP file for processing, and returning it to the client for processing.

Three file js files and one php file: cookie. js page. js proptype. js result. php file. let's take a look at the content of each file one by one.

First look at the cookie. js code:

// JavaScript Document
Function SetCookie (name, value, x_expires, x_path, x_domain, x_secure) {// sets a Cookie value function
// Alert (name)
Var argv = SetCookie. arguments;
// Alert (this. argv );
Var argc = SetCookie. arguments. length;
Var expires = (argc> 2 )? X_expires: null;
Var path = (argc> 3 )? X_path: null;
Var domain = (argc> 4 )? X_domain: null;
Var secure = (argc> 5 )? X_secure: false;
Document. cookie = name + "=" + escape (value) +
(Expires = null )? "": ("; Expires =" + expires. toGMTString () +
(Path = null )? "": ("; Path =" + path) +
(Domain = null )? "": ("; Domain =" + domain) +
(Secure = true )? "; Secure ":"");
}
Function GetCookie (name) {// read the cookie value function of the specified name
// Alert (document. cookie)
Var arg = name + "= ";
Var alen = arg. length;
Var clen = document. cookie. length;
Var I = 0;
While (I <clen)
{
Var j = I + alen;
If (document. cookie. substring (I, j) = arg)
Return getCookieVal (j );
I = document. cookie. indexOf (";", I );
If (I =-1) break;
I + = 2;
}
Return null;
}
Function getCookieVal (offset ){
Var endstr = document. cookie. indexOf (";", offset );
If (endstr =-1)
Endstr = document. cookie. length;
Return unescape (document. cookie. substring (offset, endstr ));
}
Function DeleteCookie (name) {// delete a Cookie value function
Var exp = new Date ();
Exp. setTime (exp. getTime ()-1 );
Var cval = GetCookie (name );
Document. cookie = name + "=" + cval + "; expires =" + exp. toGMTString ();
}

The file owner processes cookies.


Using php ajax pagination java ajax pagination asp.net ajax pagination jquery ajax pagination jsp ajax without refreshing pagination asp ajax pagination problem ajax implement pagination ajax jsp pagination with ajax pagination...

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.