< html > < body > < div style ="width:500;height:500;overflow:hidden;cursor:hand;border-width:1px;border-color:Black" id ="demo" > < img src ="TERRA_2008_03_16_02_38_GZ_cut.MOD02HKM_PRJ.jpg" > </ div > < script > function demo.onmousedown() { demo.setCapture(); demo.initX=event.clientX; demo.initY=event.clientY; } function demo.onmousemove() { if(event.button==1) { demo.scrollLeft+=demo.initX-event.clientX; demo.scrollTop+=demo.initY-event.clientY; demo.initX=event.clientX; demo.initY=event.clientY; } } function demo.onmouseup() { demo.releaseCapture(); } </ script > </ body > </ html > /Files/wangzhq/vvv.rar 转载于:https://www.cnblogs.com/wangzhq/archive/2008/03/28/1127221.html