function getByClass(clsName,parent){
var oParent=parent?document.getElementById(parent):document,
eles=[],
elements=oParent.getElementsByTagName('*');
for(var i=0,l=elements.length;i<l;i++){
if(elements[i].className==clsName){
eles.push(elements[i]);
}
}
return eles;
}
window.onload=drag;
function drag(){
var oTitle=getByClass('login_logo_webqq','loginPanel')[0];
oTitle.onmousedown=fnDown;
}
function fnDown(){
document.onmousemove=function(event){
event=event||window.event;
document.title=event.clientX+","+event.clientY;
}
}
相关分类