我想用一些菜单制作一个侧边栏,菜单应该可以拖放!
这是代码:
<div class="sidebar" ondrop="drop(event)" ondragover="allowDrop(event)">
<div class="about" draggable="true" ondragstart="drag(event)" id="about">
<div class="top"><p>about us</p></div>
<p class="about"></p>
</div>
<div class="contact" draggable="true" ondragstart="drag(event)" id="contact">
<div class="top"><p>contact us</p></div>
<form class="contact" action="script/mail.php" method="post" target="ifrm">
//Some INPUT
</form>
<div class="clear"></div>
</div>
</div>
拖放现在运行良好,但也可以将“关于我们”和“联系我们”拖放到彼此或表单输入中,我想禁用它!我该怎么做?