Home >php教程 >php手册 >JS asp php .net 判断网页点击来源

JS asp php .net 判断网页点击来源

WBOY
WBOYOriginal
2016-06-06 20:01:171180browse

asp: request.servervariables("HTTP_REFERER") jsp: request.getHeader("Referer"); (获取当前页是:request.getRequestURL().toString();) javascript: document.referrer PHP里可以用 $_SERVER['HTTP_REFERER'] 把如下代码加入body区域中: 你来自:BRFONT C

asp:
request.servervariables("HTTP_REFERER")   

jsp:
   request.getHeader("Referer");          (获取当前页是:request.getRequestURL().toString();)     


javascript:
document.referrer

PHP里可以用
$_SERVER['HTTP_REFERER']  

 

 

把如下代码加入

区域中:
你来自:


ASP的代码
0 then
Response.Redirect "163/index.htm"
else
Response.Redirect "sina/index.htm"
end if%>

js代码


注意此效果要以http://访问页面才能看到.

 

.NET代码

Request.UrlReferrer;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:mysql一些方法Next article:葛优