<!DOCTYPE html>
<html lang="en">
<head>
???<meta charset="UTF-8">
???<title></title>
???<script src="Drag.js"></script>
???<script src="LimitDrag.js"></script>
???<style>
???????#box1{width: 100px;
???????????height:100px;background-color: #00ee00;position: absolute;}
???????#box2{width: 100px;
???????????height:100px;background-color: red;position: absolute;}
???</style>
???<script>
???????window.onload=function(){
???????????new Drag("box1")
???????????new LimitDrag("box2")
???????}
???</script>
</head>
<body>
<div id="box1"></div>
<div id="box2"></div>
</body>
</html>
图片拖拽的继承,引用 ?1 ?(需要引入2,3两个js才能运行)
原文地址:http://www.cnblogs.com/mylove0/p/7465009.html