当前位置: 代码迷 >> Web前端 >> 用window.location.href开展跳转,request得不到refer
  详细解决方案

用window.location.href开展跳转,request得不到refer

热度:199   发布时间:2012-10-31 14:37:32.0
用window.location.href进行跳转,request得不到refer
在ie下,用window.location.href=*******;  赋值进行跳转的话,下一个页面在request里面得不到refer

解决办法:
function showimage(year,month,day) {
     //解决ie下不能得到refer的问题
     var url = "${contextPath}/calendar/getCalDayView/"+year+"/"+month+"/"+day;
     var e = document.createElement("a");
     e.href = url;
     document.body.appendChild(e);
     e.click();       
    }; 
  相关解决方案