建站经验 experience
当前位置:首页 > 网站建设专题 > 建站经验
.net中实现listBox左右移动
发布日期:2015-06-03 阅读次数:808 字体大小:

这里广州网站制作公司镭拓科技推荐一段使用.net实现listBox左右移动的代码,简单实用,有需要的小伙伴参考下吧。

<div style="width:200px; float:left;"> 
    <table> 
    <tr> 
        <td  width="50%"> 
        <asp:ListBox ID="ListBox2" runat="server" Height="128px" Width="148px">
            <asp:ListItem Value="张三"></asp:ListItem>
            <asp:ListItem Value="李四"></asp:ListItem>
            <asp:ListItem>王五</asp:ListItem>
            </asp:ListBox>
        </td> 
        <td> 
            <asp:Button ID="Button2" runat="server" Text="《"></asp:Button>
            <asp:Button ID="Button1" runat="server" Text="<"></asp:Button>
            <asp:Button ID="Button3" runat="server" Text=">"></asp:Button>
            <asp:Button ID="Button4" runat="server" Text="》"></asp:Button>
        </td> 
        <td align="left" width="50%"> 
             <asp:ListBox ID="ListBox1" runat="server" Height="128px" Width="148px"></asp:ListBox>
        </td> 
    </tr> 
    </table> 
    </div>