Drag and Drop between two select Objets
来源:互联网 发布:网络机顶盒安装 编辑:程序博客网 时间:2024/05/23 16:54
Drag and Drop between two select Objets
Move one element and you will see the select objects follow the element drap or drop
Home- You must load the javascript DragAndDrop.js
- In your HTML page put on tag body
<body onload="_initDragEtDrop(event)">
- In your HTML page you must create one div 't1' where you want to print the Drag and Drop
<div id="t1" > < /div>
- In your HTML page you must load the script "DragAndDrop.js" with instruction :
<script src="DragAndDrop.js" type="text/javascript" language="javascript"></script>
- In your page HTML you must have 2 tags <select> named "drag" and "drop", like this
<select name="drag" .... >
<select name="drop" .... > - If you want put a "Reset Button", you can use the function ResetDragAndDrop(event), like this
<input type="button" value="reset" on click="ResetDragAndDrop(event)" />
An example
<html>
<head>
</head>
<body onload="_initDragEtDrop(event)">
<div id="t1">
<br>
<br>
<br>
<br>
Drag et Drop
</div>
<form>
<div style="display: none; visibility: hidden">
<select name="drag" >
<option value="bon">bon</option>
<option value="aimable">aimable</option>
</select>
<select name="drop">
<option value="mauvais">mauvais</option>
<option value="drole">drole</option>
</select>
</div>
<input type="submit" onclick="print_your_choice('drag'); print_your_choice('drop')"/>
</form>
<script type="text/javascript">
function print_your_choice(elem)
{
var select=document.getElementsByName(elem)[0];
var o=select.options;
var v=' ';
for (i=0;i<o.length;i++) {
v=v+' '+o[i].value;
}
alert(elem+'='+v);
}
</script>
<script src="DragAndDrop.js" type="text/javascript" language="javascript"></script>
</body>
</html>
- Drag and Drop between two select Objets
- Drag and Drop between Controls
- Drag and Drop
- 学习drag and drop
- 关于drag and drop
- html5 Drag and drop
- Ajax Drag and Drop
- QT5 drag and drop
- HTML5 Drag and Drop
- drag and drop学习
- android - Drag and Drop
- html5 Drag and Drop
- Qt Drag and Drop
- drag and drop(拖拽)
- Drag And Drop 进阶
- drag and drop 事件
- Drag and drop with Javascript
- Drag And Drop In Javascript
- [转载]再次突破雷客图ASP站长安全助手
- **钢琴科技公司--网站改版计划书
- 高光简历制作
- 从数据结构“图”,到游戏地图寻径,从《星际》中启发的
- 一个女CIO的诞生(续)
- Drag and Drop between two select Objets
- ISessionFactory配置
- java游戏-PrisonBreak1.1
- 思考10秒
- 一个女CIO的诞生(后记)
- ASP.NET 2.0个性化配置(profile)
- 百钱百鸡C++实现
- 基于网络的 Red Hat 无人值守安装
- JMX 入门学习-(1)创建一个MBean