Js5 calls test. phpjs once in a second. how can I write it? Can someone help me?

Source: Internet
Author: User
Js5 calls test once in seconds. which of the following can help me with phpjs? & lt; inputname = & quot; send & quot; type = & quot; button & quot; id = & quot; send & quot; onclick = & quot; SendMa urgent, js5 calls test once in seconds. why does php js fail to be written? Can someone help me?

Js page
Function SendMail ()
{
}
Js5 calls test. php once in seconds

------ Solution --------------------
For reference only:
JScript code
Var xmlHttp; var timer = null; var timerRunning = false; var url; function createXMLHttpRequest () {if (window. XMLHttpRequest) {xmlHttp = new XMLHttpRequest ();} else if (window. activeXObject) {xmlHttp = new ActiveXObject ("Microsoft. XMLHTTP ") ;}} function statusStop () {if (timerRunning) {clearTimeout (timer) ;}timerrunning = true ;}/ * ------------------- interval query ------------------- */function autoDee P () {createXMLHttpRequest (); url = "map. php? Refresh = "+ Math. random (); method = "GET"; xmlHttp. open (method, url, true); xmlHttp. onreadystatechange = null; xmlHttp. send (null); timerRunning = false; timer = setTimeout ('autodeep () ', 5000); // execute once every 5 seconds} function statusBegin () {statusStop (); autoDeep ();} statusBegin ();

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.