JavaScript收集用户点击习惯

function call_0410(type,item,page)
{try{var purl='';if (type == "A"){purl = window.event.srcElement.href;}else if (type == "IMG"){purl = window.event.srcElement.parentNode.href;};var iurl = 'http://trace.qq.com/collect?pj=1001&item='+item+'&page='+page+'&url='+purl+'&rnd='+Math.random();var img  = new Image(1,1);img.onerror = function (){};img.src = iurl; } catch (e) {}}

function register0410(item,page)
{try{var type = window.event.srcElement.tagName;if (type == "A" || type == "IMG" ) {call_0410(type,item, page);}return true;}catch(e){}}

这段代码是腾讯首页上,用来收集用户点击习惯的代码

你可能感兴趣的:(JavaScript,qq,腾讯)