Javascript 为什么window.location.href不在IE中显示哈希

Javascript 为什么window.location.href不在IE中显示哈希,javascript,hash,Javascript,Hash,在Chrome和Firefox中,用户被成功重定向到www.mysite.com/testpage/12,但在IE中,用户被重定向到www.mysite.com/testpage/而没有散列,我如何强制浏览器读取散列 更新: 以下是实际代码: window.location.href = 'www.mysite.com/testpage/#12'; 在IE中,它从开始停止读取?发现错误: siteurl+'?selection/应该是siteurl+'/?selection/在URL的两个部分

在Chrome和Firefox中,用户被成功重定向到www.mysite.com/testpage/12,但在IE中,用户被重定向到www.mysite.com/testpage/而没有散列,我如何强制浏览器读取散列

更新:

以下是实际代码:

window.location.href = 'www.mysite.com/testpage/#12';
在IE中,它从开始停止读取?

发现错误:
siteurl+'?selection/应该是siteurl+'/?selection/在URL的两个部分之间有一个额外的“/”在IE6中不起作用,在IE7+中效果很好。我已经在Windows 7上的IE 9.0.8112.16421中成功测试了它。页面HTTP 3XX重定向了什么吗?我在问题中做了编辑,请阅读。这基本上等于'location.href=';'。您是否确保您请求的页面不会重定向?不,它不会重定向,并且在chrome和firefox上运行良好,问题只在于IE
window.location.href = siteurl+'?selection/'+edu_year_selectionreal+'/'+semester_selectionreal+'/'+subject_selectionreal+'#?selection/'+edu_year_selectionreal+'/'+semester_selectionreal+'/'+subject_selectionreal+'/'+edu_year_selectiontitle+'/'+semester_selectiontitle+'/'+subject_selectiontitle;