Ajax + php + mysql refreshing paging code (1/2)

Source: Internet
Author: User
Tags mysql tutorial

Ajax + php + mysql refreshing paging code

Ajax + php tutorial + mysql tutorial without refreshing paging code

<! Doctype html public "-// w3c // dtd html 4.01 transitional // en" "http://www.w3.org/tr/html4/loose.dtd">
2 3 4 <title> voting result </title>
5 <meta http-equiv = "content-type" content = "text/html; charset = UTF-8"/>
6
7 <script type = "text/Webpage effects">
8
9 function getxmlhttpobject ()
10 {
11 var xmlhttp = null;
12 try
13 {
14 // firefox, opera 8.0 +, safari
15 xmlhttp = new xmlhttprequest ();
16}
17 catch (e)
18 {
19 // internet explorer
20 try
21 {
22 xmlhttp = new activexobject ("msxml2.xmlhttp ");
23}
24 catch (e)
25 {
26 xmlhttp = new activexobject ("microsoft. xmlhttp ");
27}
28}
29 return xmlhttp;
30}
31 function checkajax (){
32 xmlhttp = getxmlhttpobject ()
33
34 if (xmlhttp = null)
35 {
36 alert ("your browser does not support ajax! ");
37 return;
38} else
39 {
40 return xmlhttp;
41}
42}
43 function preshow (){
44 ajaxobj = checkajax ();
45 var url = "page. php? Page = 1 ";
46 ajaxobj. onreadystatechange = statechanged;
47 ajaxobj. open ("get", url, true );
48 ajaxobj. send (null );
49}
50 function showhint1 (str)
51 {
52 ajaxobj = checkajax ();
53 document. getelementbyid ("msg"). innerhtml = "reading data ...... ";
54
55 var url = str;
56 ajaxobj. onreadystatechange = statechanged;
57 ajaxobj. open ("get", url, true );
58 ajaxobj. send (null );
59
60}

1 2

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.