图片太大,拖动显示图片 全图
<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
<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>