我的 URL 参数在哪里?

发布于 2024-07-16 03:26:31 字数 729 浏览 5 评论 0原文

我有一个用框架制作的旧网页(是的,我知道)。 一个框架 (letFrame) 正在尝试使用以下锚点更新另一个框架 (rightFrame):

<a href="foo.asp?myVar=BAR" target=rightFrame>

foo.asp 已加载到 rightFrame 中,看起来像这样

<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="MYNAME" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<form target="_self">
<SCRIPT LANGUAGE=vbscript>

    Option Explicit

    dim myURL

    myURL = parent.location.href

<...blahblablah...>

当我打印出 myURL的值时>parent.location.href 我发现参数部分 ?myVar=BAR 已经被删除了。 它只是读取foo.asp

IIS 中是否有某些设置可以执行此操作; 或者还有其他方法来获取参数部分?

I have a legacy web page made with frames (yah, I know). One frame (letFrame) is trying to update another frame (rightFrame) with the following anchor:

<a href="foo.asp?myVar=BAR" target=rightFrame>

foo.asp is already loaded in rightFrame and looks something like this

<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="MYNAME" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<form target="_self">
<SCRIPT LANGUAGE=vbscript>

    Option Explicit

    dim myURL

    myURL = parent.location.href

<...blahblablah...>

When I print out the value of myURL or parent.location.href I find that the parameter portion ?myVar=BAR has already been stripped off. It just reads foo.asp.

Is there some setting in IIS that would be doing this; or is there another way to get the parameter portion?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

静若繁花 2024-07-23 03:26:32

看起来您正在获取父级的 url。 尝试window.location.href。

另外.. 在 ASP 中,您应该使用.. Request.Querystring("param")。

Looks like you're grabbing the url of the parent. Try window.location.href.

Also.. In ASP, you should be using.. Request.Querystring("param").

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文