跪求解决一些问题。
时间:2009-06-30
来源:互联网
因为我的文学造诣在小学里才有用。所以就不描述了。代码如下:
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<style type="text/css">
.draggable
{
width:50px;height:40px;
}
.green
{
border:solid 2px green;
background-color:White;
}
.red
{
border:solid 2px red;
background-color:White;
}
.droppable
{
background-color:White;
border:solid 3px #000;
width:300px;
height:300px;
float:right;
}
</style>
<script type="text/javascript" src="jquery.ui/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="jquery.ui/jquery-ui-1.7.custom.min.js"></script>
<script type="text/javascript">
var goodsName = "goods";
$(function() {
$(".draggable").draggable({ helper: "clone" });
$("#droppable-accept").droppable({
accept: function(draggable) {
return $(draggable).hasClass("draggable");
},
drop: function() {
$(this).prepend($("#r").clone());
}
});
});
</script>
</head>
<body>
<div id="r" class="draggable red">red</div>
<div id="g" class="draggable green">green</div>
<div id="droppable-accept" class="droppable">droppable</div>
</body>
</html>
我想请问,要怎么判断拉进去的是哪个DIV? drop: function() { }这个函数里面该怎么写?高手们请给条路走走。。
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<style type="text/css">
.draggable
{
width:50px;height:40px;
}
.green
{
border:solid 2px green;
background-color:White;
}
.red
{
border:solid 2px red;
background-color:White;
}
.droppable
{
background-color:White;
border:solid 3px #000;
width:300px;
height:300px;
float:right;
}
</style>
<script type="text/javascript" src="jquery.ui/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="jquery.ui/jquery-ui-1.7.custom.min.js"></script>
<script type="text/javascript">
var goodsName = "goods";
$(function() {
$(".draggable").draggable({ helper: "clone" });
$("#droppable-accept").droppable({
accept: function(draggable) {
return $(draggable).hasClass("draggable");
},
drop: function() {
$(this).prepend($("#r").clone());
}
});
});
</script>
</head>
<body>
<div id="r" class="draggable red">red</div>
<div id="g" class="draggable green">green</div>
<div id="droppable-accept" class="droppable">droppable</div>
</body>
</html>
我想请问,要怎么判断拉进去的是哪个DIV? drop: function() { }这个函数里面该怎么写?高手们请给条路走走。。
[ 此帖被alan8180在2009-06-30 21:55重新编辑 ]
作者: alan8180 发布时间: 2009-06-30
Many non-governmental Replica Handbags beauty secret
Designer Handbags tips with small, AION Kina we are only
Aion gold to follow it Aion money blindly and did
Buy Aion Kina not notice something Buy Aion gold inherent in the
composition and texture of AION power leveling the individual physical
AION Items characteristics to Aion Account
meet the hot pursuit of
Designer Handbags tips with small, AION Kina we are only
Aion gold to follow it Aion money blindly and did
Buy Aion Kina not notice something Buy Aion gold inherent in the
composition and texture of AION power leveling the individual physical
AION Items characteristics to Aion Account
meet the hot pursuit of
作者: asdfjklmn 发布时间: 2009-08-12
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28