记一个update的js


function updatePage() {
if(window.XMLHttpRequest)
{
var xmlhttp = new XMLHttpRequest();
}else if(window.ActiveXObject){
var xmlhttp = new ActiveXObject("MicrosoftXMLHTTP");
}
if(xmlhttp)
{
xmlhttp.open('GET', 'http://baizoo.cn/update.php?url=baizoo.cn&ajax=1');
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
window.location.href="http://baizoo.cn/baizoo.cn";
}
}
xmlhttp.send(null);
}
}



Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>