1 window.onload = function(){
 2             var tt=document.getElementById("tttt");
 3             tt.onmousedown = function(e){ 
document.onmousemove = function(e){ 7 tt.style.left = e.clientX-leftLen+"px"; 8 tt.style.top = e.clientY-topLen+"px"; 9 } 10 }



首先参数e其实是

事件对象_传参数

 也就是传参数为了获得这个事件对象,但当函数嵌套时,里边的函数想要使用这个对象时并不能直接使用外边函数的e(事件对象 我传参时使用e)而要在自己这里再次写上形参才能调用