Uncaught TypeError: Cannot read property 'offsetX' of undefined一直错啊。。求求求解
function onMouseMove(e)
{
if(e.offsetX || e.layerX)
{
mx=e.offsetX == undefined ? e.layerX : e.offsetX;
my=e.offsetY == undefined ? e.layerY : e.offsetY;
console.log(mx);
}
}
为何一直提示错误呢。求指导