【发布时间】:2009-11-09 20:27:15
【问题描述】:
window.location.hash 是否包含 url 部分的编码或解码表示?
当我在 Firefox 3.5 和 Internet Explorer 8 中打开相同的 url(http://localhost/something/#%C3%BC 其中%C3%BC转换为ü)时,document.location.hash 的值不同:
- IE8:
#%C3%BC - FF3.5:
#ü
有没有办法在两个浏览器中获得一个变体?
【问题讨论】:
标签: javascript html url encoding fragment-identifier