zjm*_*126 2 javascript jquery drag
这是我的代码:
<div id="box" style="border:1px solid red;height:100px;width:150px;position:relative;background:#eee">
<div id="head" style="background:black">drag me</div>
<div id="content" contenteditable=true style="border-bottom:1px solid red;height:70px;margin-bottom:5px;"> edit it </div>
<input id="ok" type="button" value="ok"/>
<input id="cancel" type="button" value="cancel"/>
</div>
Run Code Online (Sandbox Code Playgroud)
并且脚本是:
$('#box').draggable()
Run Code Online (Sandbox Code Playgroud)
演示在这里:http://jsfiddle.net/VRxZe/
谢谢