function cnvs_getCoordinates(e){x=e.clientX;y=e.clientY;document.getElementById("xycoordinates").innerHTML="Coordinates: (" + x + "," + y + ")";}为什么非要传个参数,有什么好处,下面这么些有什么不同?function cnvs_getCoordinates(){x=event.clientX;y=event.clientY;document.getElementById("xycoordinates").innerHTML="Coordinates: (" + x + "," + y + ")";}
添加回答
举报
0/150
提交
取消