好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

下图所示效果怎么实现_html/css_WEB-ITnose

想请教下图所示的效果怎么实现,选择左边框的姓名,点击“>>”键,选中的名字自动显示在右框中,并在左框中消失。


回复讨论(解决方案)

两个ListBox加Hidden再加Js,Js操作ListBox网上应该有很多代码的

其实就是左边删除一个元素,右边添加一个元素

两个ListBox加Hidden再加Js,Js操作ListBox网上应该有很多代码的
貌似HTML里面没有listbox这个标签吧????

补充说明一下,我想用HTML实现

有效果,但是不美观。。。。




无标题文档




$(document).ready(function(){
var s = "";
var g = "";
$("#toRight").click(function(){
if(s!==""&&s!=null&&g=="left"){
$(".right").append(s);
$("p").removeClass("select");
}
});
$("#toLeft").click(function(){
if(s!==""&&s!=null&&g=="right"){

$(".left").append(s);
$("p").removeClass("select");
}
});
$("p").click(function(){
$("p").removeClass("select");
$(this).addClass("select")
s = $(this);
g = $(this).parent().attr("class");
});
});






body{
margin:0px;}
div{
margin:0px;
border:#000 1px solid;
width:100px;
height:200px;
}
.right{
position:absolute;
left:200px;
top:10px;
}
.left{
margin-left:20px;
margin-top:10px;
}
.select{
background:#F00;
}






查看更多关于下图所示效果怎么实现_html/css_WEB-ITnose的详细内容...

  阅读:40次