帮忙看一下为什么提示qq.js:24 Uncaught TypeError: Cannot set property 'onmousedown' of undefined
function drag(){
var oTitle=getByClass('top','main')[0]; //调用封装函数
oTitle.onmousedown=fnDown; //绑定onmousedown事件,当按下鼠标时调用fnDown函数
}
//封装fnDown函数
function fnDown(){
document.onmousemove=function(event){
event=event||window.event;
document.title=event.clientX+','+event.clientY;
}
}