<select name=select1>
<option value="1">文本1</option>
<option value="2">文本2</option>
<option value="3">文本3</option>
<option value="4">文本4</option>
</select>
<input name=haha2>
<input name=button value="添加" onclick=tian() type=button>
<script language=javascript>
function tian()
{
document.all.haha2.value=document.all.select1.value+","+document.all.select1.options[document.all.select1.selectedIndex].text;
}
</script>
<option value="1">文本1</option>
<option value="2">文本2</option>
<option value="3">文本3</option>
<option value="4">文本4</option>
</select>
<input name=haha2>
<input name=button value="添加" onclick=tian() type=button>
<script language=javascript>
function tian()
{
document.all.haha2.value=document.all.select1.value+","+document.all.select1.options[document.all.select1.selectedIndex].text;
}
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<form name="form1" method="post" action="">
<select name="select1">
<option value="111">111</option>
<option value="222">222</option>
<option value="333">333</option>
<option value="444">444</option>
</select>
<input type="button" name="Submit" value="删除" onClick="document.all('select1').options.remove(document.forms[0].select1.selectedIndex);">
</form>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<SCRIPT language=JavaScript>
function del(){
var aaa = document.forms[0].input1.value ;
var bbb = document.forms[0].select1.value ;
var ccc = document.all.select1.options[document.all.select1.selectedIndex].text ;
var ddd= bbb+','+ccc+';' ;
var eee = aaa.replace(ddd,"");
//alert(eee);
document.forms[0].input1.value = eee ;
//alert(document.forms[0].input1.value);}
</script>
<body>
<form name="form1" method="post" action="">
<select name="select1">
<option value="111">111</option>
<option value="222">222</option>
<option value="333">333</option>
<option value="444">444</option>
</select>
<input type="button" name="Submit" value="删除" onClick="del();document.all('select1').options.remove(document.forms[0].select1.selectedIndex);">
<input name="input1" type="hidden" id="input1" value="111,111;222,222;333,333;444,444;">
</form>
</body>
</html>