我看例子可以实现左边上下的排序并可以拖放左边拖放到右边,有谁知道,我要拖动左边的,实现右边的排序呢,拜托哦。
<html>
<head>
<title></title>
<script type="text/javascript" src="lib/prototype.js"></script>
<script type="text/javascript" src="src/scriptaculous.js"></script> <script type="text/javascript">
window.onload = function() {
Sortable.create('List1',
{containment: ['List1','List2'], dropOnEmpty: true});
Sortable.create('List2',
{containment: ['List1','List2'], dropOnEmpty: true});
}
</script> <style type="text/css">
li { cursor: move; }
ul {
width: 88px;
border: 1px solid blue;
padding: 3px 3px 3px 20px;
} </style>
</head>
<body> <p>拖放排序</p> <div style="float:left">
<ul id="List1">
<li>11111</li>
<li>22222</li>
<li>33333</li>
<li>44444</li>
</ul>
</div> <div style="float:left;margin-left:32px">
<ul id="List2">
<li>1111-1</li>
<li>2222-1</li>
<li>3333-1</li>
<li>4444-1</li>
<li>5555-1</li>
</ul>
</div> </body>
</html>
<html>
<head>
<title></title>
<script type="text/javascript" src="lib/prototype.js"></script>
<script type="text/javascript" src="src/scriptaculous.js"></script> <script type="text/javascript">
window.onload = function() {
Sortable.create('List1',
{containment: ['List1','List2'], dropOnEmpty: true});
Sortable.create('List2',
{containment: ['List1','List2'], dropOnEmpty: true});
}
</script> <style type="text/css">
li { cursor: move; }
ul {
width: 88px;
border: 1px solid blue;
padding: 3px 3px 3px 20px;
} </style>
</head>
<body> <p>拖放排序</p> <div style="float:left">
<ul id="List1">
<li>11111</li>
<li>22222</li>
<li>33333</li>
<li>44444</li>
</ul>
</div> <div style="float:left;margin-left:32px">
<ul id="List2">
<li>1111-1</li>
<li>2222-1</li>
<li>3333-1</li>
<li>4444-1</li>
<li>5555-1</li>
</ul>
</div> </body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货