// JavaScript Document
function getByClass(ClassName,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=ClassName){
eles.push(elements[i]);
}
}
return eles;
}
window.onload=drag;
function drag(){
var oTitle=document.getElementsByTagName("login_logo_webqq","loginPanel")[0];
oTitle.onmousedown=fnDown();
}
function fnDown(){
var oDrag = document.getElementById("loginPanel");
document.onmousemove=function(event){
event=event||window.event;
oDrag.style.left=clientX+"px";
oDrag.style.top=clientY+"px";
}
}
相关分类