刷新
var btn = document.getElementById('btn');
    btn.onclick = function () {
      // console.log(location.href);
      // location.href = 'http://www.itheima.com';
      
      // assign 委派
      // assign() 的作用和href的作用一样。可以让页面跳转到指定的地方
      // location.assign('http://www.itheima.com');
      // 
      // 替换掉地址栏中的地址,但是不记录历史
      // location.replace('http://www.itheima.com');
      // 重新加载 refresh   f5
      // 
      // 参数   true 强制从服务器获取页面    false  如果浏览器有缓存的话,直接从缓存获取页面
      location.reload(true);
      // f5  刷新页面,可能从缓存中加载   control+f5 强制刷新  从服务器获取页面
    }
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号