繁体   English   中英

页面网址与IE和Firefox不同

[英]Page url is different in IE and Firefox

我有使用JQuery的有线情况。 我的网站上有三页。

  1. 的index.html
  2. business.html
  3. operation.htmls

当我打开business.html URL是firefox时 ,它会像这样打开

http://localhost:9090/Operational/business.html

当我点击此页面上名为“operation.html”的按钮时,它会打开一个包含以下地址的新页面

http://localhost:9090/Operational/operation.html

到目前为止都很好。 但是,当我在IE 9中打开相同的operation.html页面时,URL是不寻常的:

http://localhost:9090/Operational/business.html#/Operational/Operations.html

为什么会这样? 有人可以对此有所了解吗? 我卡住了:P @ !!!!

添加更多细节

我正在使用一个名为tiggzi的开发工具。 这是代码的锚定部分。

$('#j_2 [name="mobilenavbaritem4_141"]').die().live({
    click: function () {
        if (!$(this).attr('disabled')) {
            Tiggr.navigateTo('Operations', {
                transition: 'slide',
                reverse: false
            });
        }
    }
});

在没有看到代码的情况下,我们只能推测,但页面很可能会有JavaScript更新内容,然后使用历史API来设置可收藏的URI。

IE9不支持历史API,因此它回退到使用片段标识符作为黑客。

如果有人直接访问http://localhost:9090/Operational/business.html#/Operational/Operations.html ,服务器将提供business.html的内容,然后JavaScript将请求Operations.html的内容和代替它。

多数民众赞成因为您可能已经onclick Anchor tag以及工作href

如果是这样的话,把return false; 在onclick结束时。

我找到了问题和解决方案。

我正在使用tiggzi的一个名为tiggr的自定义jquery移动库。 这导致了IE中的错误。

代码是这样的

Tiggr.navigateTo('Operations', { transition: 'slide', reverse: false })

现在我用相同的替换了

window.open('Operations.html', '_self', 'width=600,height=400,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes')

我知道这个调整在过渡期间有问题,但我可以继续。

谢谢大家的帮助!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM