代码如下,做的是QQ面板那个课程
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() {
var oDrag=document.getElementById('loginPanel');
document.onmousemove=function(event){
event=event||window.event;
document.title=event.clientX+','+event.clientY;
}
}
慕的地8582982
慕粉1628116899