IE6 丢失查询字符串 [英] IE6 Losing Querystring

查看:49
本文介绍了IE6 丢失查询字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面,它使用 javascript window.location 从查询字符串中获取值.这在从网络服务器运行时工作正常,但如果我通过将其放在地址栏中使用 IE6 在本地运行它

I have a page that grabs values from the query string using javascript window.location. This works fine when run from a webserver but if I run it locally using IE6 by putting this in the address bar

c:\mysite\index.htm

网站创建的任何查询字符串都会丢失,window.location 只包含.htm 之前的位置.

Any query strings the site creates get lost and window.location just contains the location upto .htm.

我意识到上面的示例没有查询字符串,但该页面链接到有查询字符串的页面.从网络共享(例如 \\server\mysite\index.htm)运行时,这也会失败.它似乎在 IE7+ 中运行良好,但仅在 IE6 中失败.

I realize the example above has no query string but that page links off to pages that do. This also fails when running from a network share e.g \\server\mysite\index.htm. It seems to work fine in IE7+ and only fails in IE6.

任何让我发疯的想法.

我刚刚意识到这是在模态窗口上发生的,这有什么不同吗?

Edit : I've jsut realised this is happening on a modal window does that make any difference?

推荐答案

似乎 IE6 在模式窗口本地运行时会忽略任何查询字符串.通过将变量作为对话框参数而不是查询字符串传递到模态窗口来解决这个问题.

It seems that IE6 disregards any querystrings when running locally on modal windows. Got around the problem by passing the variables into the modal window as dialog arguments rather than querystrings.

这篇关于IE6 丢失查询字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆