帮帮看这个反回前一页的代码怎么设置

来源:百度知道 编辑:UC知道 时间:2024/05/07 07:02:02
这是用DW做成的一个删除页,下面代码第八行是删除后转到的页,这里只能设置成一个文件路径,但是我有三个页,假设是web1.asp web2.asp web3.asp 确定页是del.asp 如果我在web1.asp 点删除后转到del.asp页进行确定删除,删除后必须返回到web1.asp页,那么转到的地址就是web1.asp,如果我在web2.asp点删除,来del.asp删除后,转到的是web1.asp而不是web2.asp了,这个问题怎么坚决呢?我想用javascript:history.back();这个代码来返回前一页,但是不行,我不知道怎么设置代码,我不太懂,所以问大家,希望能得到回答,谢谢

<% ' *** Delete Record: declare variables
if (CStr(Request("MM_delete")) = "form1" And CStr(Request("MM_recordId")) <> "") Then
MM_editConnection = MM_conn_STRING
MM_editTable = "song"
MM_editColumn = "ID"
MM_recordId = "" + Request.Form("MM_recordId") + ""
MM_editRedirectUrl = "allsong.asp"

' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompa

<%
urldate="?"
for each name in request.QueryString
urldate=urldate&name&"="&request.QueryString(name)&"&"
next
if len(urldate)>1 then
urldate=left(urldate,len(urldate)-1)
else
urldate=""
end if
response.redirect(request.ServerVariables("HTTP_REFERER")&urldate)
%>
上面这段代码可以让超连接到这个页的页面返回到自己,就算有url参数也不影响。你可以找一个位置把它放到你的网页中就可以了。