在div之间拖放列表数据 [英] Drag and Drop list data between divs

查看:89
本文介绍了在div之间拖放列表数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好研究员,

我正在一个asp.net页面上工作,该页面有两个Div's.

 <   div  > ; 

<   div     ="   div1" <   asp:DropDownList     ID   ="   runat   服务器" 宽度   220像素" <   asp:ListItem    已选择  ="  <  > 
  <   asp:ListItem  > 临时证书<  /asp:ListItem  > 
  <   asp:ListItem  > 永久<  /asp:ListItem  > 
  <   asp:ListItem  > 职业<  /asp:ListItem  > 
  <   asp:ListItem  > 专业<  /asp:ListItem  > 
  <  /asp:DropDownList  > 
 <   asp:ImageButton     ID   ="   runat   服务器"  ImageUrl   图片/ui/add.png"    / > 
 <   hr    > 
 <   p     ="  > <  /p  > 
 <   hr    > 
<  /div  > 

<   div     ="   div2" <  > 

<  /div  >  



1)我需要能够从"DIV1"上的放下"列表中选择一个项目,并且当我单击"DIV1"上的"ADD"按钮时,它应该将所选项目添加到"Div2"中(如复制和粘贴)


2)第二个问题比较棘手...我正在使用OR运算符,例如在要添加Or运算符的所选项目之间的DIV2上.像这样

永久
职业

专业

3)我希望我的OR在任何地方都可以从DIV1拖动到DIV2.

4)最棘手的部分:当我在Item1或Item2之间添加OR运算符时,它的行为应类似于我可以拥有Item1或我可以拥有Item2的行为.另外,我需要从代码后面知道两个或两个以上项目之间是否存在OR.

在此先感谢大家.如果需要更多说明,请告诉我.

解决方案

此CP文章完成了您所要求的.

使用JQuery进行持久性拖放 [ ^ ]

Hello Fellows,

i am working on a asp.net page , which has a Two Div''s .

<div>

<div id="div1"> Move items from here to div2  

  <asp:DropDownList ID="DDEducationInfo" runat="server" Width="220px">
  <asp:ListItem Selected="True">Select educaiton info ...</asp:ListItem>
  <asp:ListItem>Provisional Certificate</asp:ListItem>
  <asp:ListItem> Permanent</asp:ListItem>
  <asp:ListItem>occupational</asp:ListItem>
  <asp:ListItem>professional</asp:ListItem>
  </asp:DropDownList>
 <asp:ImageButton ID="IBCertificaiton" runat="server" ImageUrl="Images/ui/add.png"  />
 <hr />
 <p style="text-align: center;"> OR </p>
 <hr />
</div>

<div id="div2"> get items from div1</div>

</div>



1) I need to be able to select an item from Drop list on "DIV1" , and when i click Button "ADD" on "DIV1" , it should add selected item to "Div2" (like copy and paste)


2) Second question is more tricky ... I am working with OR Operator , such as on my DIV2 between selected item i want to add Or operator . like this

Permanent
occupational
Or
professional

3) I want my OR to be drag-able from DIV1 to DIV2 on any place.

4) Most tricky part : when i add OR operator between Item1 OR Item2 , it should act like that which mean i can have Item1 Or i can have Item2 . Plus i need to know from code behind what two or more items has OR in between .

Thanks in advance guys. If you need more clarification let me know .

解决方案

This CP article did what you just asked for.

Drag and Drop with Persistence using JQuery[^]


这篇关于在div之间拖放列表数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆