图片拖拽的继承,引用 1 (需要引入2,3两个js才能运行)

<!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>

posted @ 2017-09-01 20:38  gunner  阅读(96)  评论(0编辑  收藏  举报