这是我拖动图片的代码,但除非我刷新页面
否则它不起作用<div id="tab1" class="tab-content">
<div id="containerBox" style="position:relative; margin-top:25px; border:3px solid #dfdfdf; width:100%; height:450px;overflow:hidden;" >
<img src="images/showrooms/g_plan.png" usemap="#draggableElementMap" id="draggableElement" style=" position:absolute; top:0;left:0;cursor:move;" />
</div>
<script type="text/javascript">
var el = document.getElementById('draggableElement');
var parent = el.parentNode;
var leftEdge = parent.clientWidth - el.clientWidth;
var topEdge = parent.clientHeight - el.clientHeight;
var dragObj = new dragObject(el, null,
new Position(leftEdge, topEdge), new Position(0, 0));
</script>
</div>
答案 0 :(得分:0)
这是你正在使用的图书馆。
替换
<script src="http://www.dreamx8.net/tahlia/2/js/plan.js"></script>
用
<script src="http://tpstatic.com/_sotc/sites/default/files/61/source/javascript.js"></script>