摘要: 拿GA为例子第一步:监测代码被加载 页面标记方法能正常运行,要求在页面加入一段JS的监测代码;用户打开页面,JS将会被执行。<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['om._setAccount', xxxx']); _gaq.push(['om._setCookiePath','/xxxxxx/']); _gaq.push(['om._addOrganic', 'baidu', &# 阅读全文
posted @ 2013-01-17 14:50 纳闷儿 阅读(1435) 评论(0) 推荐(1) 编辑
摘要: 目前通常使用的两种监测方法——Server Log和Page Tag词组:WA(Web Analytics)一、Google Analytics(GA)1、最基本GA代码:<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-X']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement( 阅读全文
posted @ 2013-01-05 18:21 纳闷儿 阅读(358) 评论(0) 推荐(0) 编辑
摘要: document.compatMode 检查当前的文档渲染模式返回值:BackCompat和CSS1Compat;IE对两种模式渲染差别很大;BackCompat:Standards-compliantmodeisnotswitchedon.(QuirksMode) //默认模式CSS1Compat:Standards-compliantmodeisswitchedon.(StandardsMode) //标准模式例子:alert(document.body.clientWidth + '-' + document.documentElement.clientWidth + & 阅读全文
posted @ 2013-01-04 16:00 纳闷儿 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 一、创建文档 有以下三种方法: 1、CreateTextFile 方法 var fso, f1; fso = new ActiveXObject("Scripting.FileSystemObject"); f1 = fso.CreateTextFile("c:\\testfile.txt", true); 2、使用 FileSystemObject 对象的 OpenTextFile 方法,并设置 ForWriting 标志。 var fso, ts; var ForWriting= 2; fso = new ActiveXObject("Sc 阅读全文
posted @ 2012-12-20 17:16 纳闷儿 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 1.ActiveXObject对象使用详解newObj = new ActiveXObject( servername.typename[, location])newObj是必选项。要赋值为 ActiveXObject 的变量名。servername是必选项。提供该对象的应用程序的名称。typename是必选项。要创建的对象的类型或类。location是可选项。创建该对象的网络服务器的名称。2.JS的Document属性和方法document.title //设置文档标题等价于HTML的title标签document.bgColor //设置页面背景色document.fgColor //设 阅读全文
posted @ 2012-11-12 17:46 纳闷儿 阅读(187) 评论(0) 推荐(0) 编辑