Dhtml:浏览大图时鼠标感应控制层滚动条的移动

代码很短:
<div style="overflow:auto; width:300; height:300" id=a>
  <img src="http://www.loveinhere.com/images/funPic/1000/p_10141.jpg" width="800" height="800"  onmousemove='a.scrollLeft=event.x*2.5-a.offsetLeft-100;a.scrollTop=event.y*2.5-a.offsetTop-100'>
</div>

你可能感兴趣的:(html)