![]() |
|
首页 │ Apache │ Linux│ Java│ MySQL│ 注册│帮助 | |||
相关问题
我想用setTitmout() 来一直执行这个函数,达到你刷新一样的效果,为什么我要本地可以,在服务器上面不行呢。必须要刷新 spy.php 生成的XML文件,才可以更新。我本地为什么又可以呢,请大家帮帮忙……
CODE: function upcontent('spy.php') { window.setTimeout("upcontent('spy.php')",300); http_request = false; if (window.XMLHttpRequest) { // Mozilla, Safari,... http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { // IE try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } http_request.onreadystatechange = updatecontents; http_request.open('GET', url, true); http_request.send(null); } function updatecontents(){ ................................. } |
提问者:xiejin8877 08-22 09:09
答复

