有没有一种方法可以获取用户在经典 ASP 中所在的上一页?我正在寻找 JavaScript 中的 history.go(-1)
的等价物。
最佳答案
根据您的需要,您可以使用:
Request.ServerVariables("HTTP_REFERER");
Returns a string containing the URL of the page that referred the request to the current page using an
<a>
tag. If the page is redirected,HTTP_REFERER
is empty.
通常,如果我需要知道用户来自哪里,我会在查询字符串或表单变量中明确设置。
关于javascript - 如何从经典 ASP 的历史记录中获取上一页?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2337979/