</div>
<script> var imgid; function drop3(obj,ev){ ev.stopPropagation(); obj.appendChild(document.getElementById(imgid)); } function drag2(ev){ imgid=ev.target.id; //记录被拖动元素的属性id } function drag1(ev){ ev.preventDefault();//阻止默认操作,让外部元素可以被拖进去 } </script> </body> </html>