3条回答 默认 最新
斯洛文尼亚旅游 2017-03-27 07:26关注setInterval执行的函数this指向window,已经脱离onmouseover事件,所以不是dom对象,你用That存储this相当于做了个闭包
offsetXXXX是位置,只读的,无法设置。style不用说了吧,专门就是修改元素样式用的
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetLeft
The HTMLElement.offsetLeft read-only property returns the number of pixels that the upper left corner of the current element is offset to the left within the HTMLElement.offsetParent node.本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报

