JavaScript:
- <A href="javascript:history.back();">返回上一页</A>
返回上一页
- C#:
C#:
- string url = Request.ServerVariables["HTTP_REFERER"];//获取上一页的地址
string url = Request.ServerVariables["HTTP_REFERER"];//获取上一页的地址
- <SCRIPT language=javascript type=text/javascript>
- var btn=document.getElementById("Button1").value;
- var href=window.location.href;
- text=href;
- alert("1: " + window.location.href);
- alert("2: " + window.location);
- alert("3: " + location.href);
- alert("4: " + parent.location.href);
- alert("5: " + top.location.href);
- alert("6: " + document.location.href);
- </SCRIPT><PRE></PRE>