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

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

WBOY
Release: 2016-06-06 20:01:17
Original
1174 people have browsed it

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;

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template