window.onload = function(){
            var url=document.location.href;  //获取浏览器访问栏里的地址
            if( url.indexOf("times=")==-1 ){    //判断地址后面是否多了某些值,没有就进方法里进行刷新
                  var times = new Date();
                  if( url.indexOf("?")==-1 ){
                    window.location.href = url+"?times="+times.getTime();  
                }else{
                    window.location.href = url+"&times="+times.getTime();  
                }
            }
        } 

 

相关文章: