使div箱可移动

时间:2015-10-07 19:26:06

标签: javascript asp.net c#-4.0

我是新手,所以我有以下div:

<div id="box" style="z-index: 80; left: 400px; position: absolute; top: 50px">
                    <cc2:ExtendedBox ID="Details" runat="server" AutoGenerateRows="False"
                        CellPadding="4" DataKeyNames="Id" DataSourceID="PagingDetails" DefaultMode="Edit"
                        OnItemCommand="dvDetails_ItemCommand" ForeColor="#12424" GridLines="None"
                        Style="z-index: 102; position: relative; left: 0px; top: 0px;" Width="350px"
                        HeaderText="Job Details" OnItemInserted="dvDetails_ItemCommand"
                        />

我想让这个盒子可以移动。像用户可以将它拖到任何地方。我已阅读其他帖子以使用jquery,但有没有c#或aspx方法来执行此操作?

我也试过添加draggable =&#34; true&#34;但那不起作用:

<div id="box" style="z-index: 80; left: 400px; position: absolute; top: 50px" draggable="true">

0 个答案:

没有答案