Home > Backend Development > PHP Tutorial > Using php and js to refresh page data_PHP tutorial

Using php and js to refresh page data_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-21 16:11:37
Original
809 people have browsed it

利用"XXXX.htm"和"XXX.php"两个文件来实现数据的刷新

XXXX.htm

<script><br>// Refresh code<br>r_s = 0;<br>timenow = 0;<br>function calrs()<br>{<br>    d = new Date();<br>    h= d.getHours(); m = d.getMinutes(); s = d.getSeconds();<br><br>    if( m < 10) m = '0' + m;<BR>    if( s < 10) s = '0' + s;<BR>    status = ' ' + h + ":" + m + ":" + s;<BR>    r_s = 2000;<BR>}</P><P>calrs();</P><P>function reload_me()<BR>{<BR>    c = document.getElementById("reload1");<BR>    c.src = "";<BR>    c.src = "XXXXX.php?reload=1";</P><P>    calrs();<br><br>    setTimeout('reload_me()', r_s);<BR>}</P><P>// Refresh code<BR>setTimeout('reload_me()', r_s);<BR></script>


 echo "document.all.p_show.innerHTML= "?".rand(0,9).""";
?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/313837.htmlTechArticle利用"XXXX.htm"和"XXX.php"两个文件来实现数据的刷新 XXXX.htm head script // Refresh code r_s = 0; timenow = 0; function calrs() { d = new Date(); h= d.getHours(); m =...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template