当前位置:编程学习 > C#/ASP.NET >>

大哥大姐来帮忙

我想实现这样一种功能,在一个页面上,左侧是一个列表,右测也是一个列表,点击左侧列表中的一项之后自动添加到右侧列表,并且在右侧列表中选择一项之后可以上下移动,请问怎么实现好,谢谢各位大哥大姐啦,最好有例子(web程序) --------------------编程问答-------------------- --------------------编程问答--------------------

//添加单击事件
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ListBox1.Attributes.Add("onclick", "listclick()");
        }
    }
//后台javascript脚本
function listclick() {
    var s = document.getElementById("ListBox1").options[window.document.getElementById("ListBox1").selectedIndex].text;
    var op = new Option(s);
    document.getElementById("ListBox2").options.add(op);
}
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,