110,025
社区成员




<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script language="javascript" type="text/javascript">
<!--
function Button1_onclick()
{
var listBox1 = document.getElementById("ListBox1");
var listBox2 = document.getElementById("ListBox2");
if(listBox1.value != "")
{
listBox2.options.add(new Option(listBox1.value,listBox1.value));
listBox1.removeChild(listBox1.options[listBox1.selectedIndex]);
}
}
// -->
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ListBox ID="ListBox1" runat="server">
<asp:ListItem>0</asp:ListItem>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</asp:ListBox>
<input id="Button1" type="button" value="button" language="javascript" onclick="return Button1_onclick()" />
<asp:ListBox ID="ListBox2" runat="server"></asp:ListBox>
</div>
</form>
</body>
</html>