1. 程式人生 > >圖片拖拽的繼承,引用 1 (需要引入2,3兩個js才能運行)

圖片拖拽的繼承,引用 1 (需要引入2,3兩個js才能運行)

type left set height har title back 運行 fun

<!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才能運行)