Javscript获取客户端常用信息,做访问统计比较有用...
2007-06-20 15:48
337 查看
Javscript获取客户端常用信息,做访问统计比较有用...
<script type="text/javascript">
p = window.navigator.userAgent;//OS
document.write(p);
document.write("<br>");
v = navigator.appName;//浏览器
document.write(v);
document.write("<br>");
if(v != "Netscape")//颜色深度
{
c = screen.colorDepth;
} else {
c = screen.pixelDepth;
}
document.write(c);
document.write("<br>");
s = screen.width+"x"+screen.height;//分辨率
document.write(s);
document.write("<br>");
t = escape(document.title);//被访问页面标题
document.write(t);
document.write("<br>");
l = window.location;//被访问页面地址
document.write(l);
document.write("<br>");
var f = "";//来源页面
// if pp_frames is true then try getting the framed referral (without error checking)
if (typeof(pp_frames) != "undefined")
if (pp_frames)
f = top.document.referrer;
// get the referral for non-multi-domained-framed sites using a Netscape browser
if ((f == "") || (f == "[unknown origin]") || (f == "unknown") || (f == "undefined"))
if (document["parent"] != null)
if (parent["document"] != null) // ACCESS ERRor HERE!
if (parent.document["referrer"] != null)
if (typeof(parent.document) == "object")
f = parent.document.referrer;
// get the referral for the current document if a framed referral wasn't found
if ((f == "") || (f == "[unknown origin]") || (f == "unknown") || (f == "undefined"))
if (document["referrer"] != null)
f = document.referrer;
// convert all the unknown's into blank
if ((f == "") || (f == "[unknown origin]") || (f == "unknown") || (f == "undefined"))
f = "";
// escape the referral
f = escape(f);
document.write(f);
document.write("<br>");
//判断Alexa工具条 1安装 0未安装
document.write("<script language=/"javascript/" src=/"res://AlxRes.dll/SCRIPT/dsn.class.js/"><//script>");
function doTryAlexa()
{
try
{
aborted();
return 1;
}
catch(e)
{
return 0;
}
}
a = doTryAlexa();
document.write(a);
</script>
<script type="text/javascript">
p = window.navigator.userAgent;//OS
document.write(p);
document.write("<br>");
v = navigator.appName;//浏览器
document.write(v);
document.write("<br>");
if(v != "Netscape")//颜色深度
{
c = screen.colorDepth;
} else {
c = screen.pixelDepth;
}
document.write(c);
document.write("<br>");
s = screen.width+"x"+screen.height;//分辨率
document.write(s);
document.write("<br>");
t = escape(document.title);//被访问页面标题
document.write(t);
document.write("<br>");
l = window.location;//被访问页面地址
document.write(l);
document.write("<br>");
var f = "";//来源页面
// if pp_frames is true then try getting the framed referral (without error checking)
if (typeof(pp_frames) != "undefined")
if (pp_frames)
f = top.document.referrer;
// get the referral for non-multi-domained-framed sites using a Netscape browser
if ((f == "") || (f == "[unknown origin]") || (f == "unknown") || (f == "undefined"))
if (document["parent"] != null)
if (parent["document"] != null) // ACCESS ERRor HERE!
if (parent.document["referrer"] != null)
if (typeof(parent.document) == "object")
f = parent.document.referrer;
// get the referral for the current document if a framed referral wasn't found
if ((f == "") || (f == "[unknown origin]") || (f == "unknown") || (f == "undefined"))
if (document["referrer"] != null)
f = document.referrer;
// convert all the unknown's into blank
if ((f == "") || (f == "[unknown origin]") || (f == "unknown") || (f == "undefined"))
f = "";
// escape the referral
f = escape(f);
document.write(f);
document.write("<br>");
//判断Alexa工具条 1安装 0未安装
document.write("<script language=/"javascript/" src=/"res://AlxRes.dll/SCRIPT/dsn.class.js/"><//script>");
function doTryAlexa()
{
try
{
aborted();
return 1;
}
catch(e)
{
return 0;
}
}
a = doTryAlexa();
document.write(a);
</script>
相关文章推荐
- 设计技巧33:从方法中获取信息 Collecting Parameter:集合参数,从方法中获取信息 容器比较常用
- 1获取访问客户端信息
- 获取计算机系统的信息或访问权常用端口清单
- PHP 可以获取客户端哪些访问信息!?
- Javascript中获取浏览器类型和操作系统版本等客户端信息常用代码
- 常用的获取客户端信息
- [4月26日的脚本] 在Office 365 Exchange Online中为大邮件获取邮箱文件夹统计信息
- Java 反射获取类详细信息的常用方法总结
- asp.net获取客户端浏览器及主机信息
- Request 获取url信息的各种方法比较
- asp.net获取客户端浏览器及主机信息
- asp.net Request获取url信息的各种方法比较
- 基于CXF框架访问远程webService服务之获取快递信息
- android的一些常用手机信息获取
- 客户端程序获取自己的ip、isp、地理位置等信息
- ASP.NET中如何获取客户端浏览器信息
- 整理及中常用的获取位置信息的方法
- node.js 获取客户端信息
- Request.RawUrl属性,和其它获取url信息的各种方法比较
- [11月14日的脚本] 在微软Exchange 2010中获取邮箱和邮箱数据库统计信息