PHP Ajax Paging One _php tutorial

Source: Internet
Author: User
Tags setcookie
Ajax Paging PHP Ajax PagingJava Ajax Paging ASP jquery Ajax PagingJSP Ajax No Refresh Paging ASP Ajax PagingAjax Paging Issues Ajax Implementation PagingAjax JSP Paging
Ajax paging is used in the client to analyze the data, and then sent to the PHP file for processing, return to the client processing manager, the idea is this.

Here is the use of three files JS file and a php file: cookie.js page.js proptype.js result.php file, we hit look at the contents of each file it.

First look at the Cookie.js code:

JavaScript Document
function Setcookie (name,value,x_expires,x_path,x_domain,x_secure) {//Set a cookie value
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) {//reads the cookie value functions 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 cookie value functions
var exp = new Date ();
Exp.settime (Exp.gettime ()-1);
var cval = GetCookie (name);
Document.cookie = name + "=" + Cval + "; Expires= "+ exp.togmtstring ();
}

This file is for the owner to process the cookie


http://www.bkjia.com/PHPjc/445077.html www.bkjia.com true http://www.bkjia.com/PHPjc/445077.html techarticle Ajax Paging PHP Ajax page Java AJAX paging ASP Ajax paging jquery Ajax paging JSP Ajax no refresh paging ASP Ajax paging Ajax paging problem AJAX implementation paging Ajax JSP paging AJ Ax Paging with ...

  • Related Article

    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.