Php and ajax enable automatic page refresh

Source: Internet
Author: User
Welcome to the Linux community forum and interact with 2 million technical staff to share the code automatically refreshed on the php implementation page. In combination with ajax, the time displayed on the page is automatically refreshed, for more information, see. 1. php page index. php code example: mce: scripttypetextjavascript! -- VarxmlHttp; functionc

Welcome to the Linux community forum and interact with 2 million technical staff> go to a php implementation page to share the code that is automatically refreshed, and use ajax to automatically refresh the page to display the time, for more information, see. 1. php page index. php code example: mce: script type = "text/javascript "! -- Var xmlHttp; function c

Welcome to the Linux community forum and interact with 2 million technicians>

I will share a php code to automatically refresh the page and use ajax to automatically refresh the time displayed on the page. For more information, see.

1. index. php on the php page

Sample Code:

  

2. html page

Sample Code:

  

  

  

  

  

Ajax dynamic display time-automatic page refresh

  

  

Current Time:

  

  

  

[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.