<html>
<head>
<title></title>
<script type=text/javascript>
function getselect(n){
var v = '';
var t = '';
for(var i = 0; i < n.options.length; i++){
if(i==0){
t = n.options[i].id;
v = n.options[i].value;
}else{
t += ','+n.options[i].id;
v += ','+n.options[i].value;
}
}
alert(v+'|'+t);
}
</script>
</head>
<body>
<table>
<form name="form1">
<tr>
<td>
<select name="n1" id="n1">
<option value='1' id="a">项目1</option>
<option value='2' id="b">项目2</option>
<option value='3' id="c">项目3</option>
<option value='4' id="d">项目4</option>
<option value='5' id="e">项目5</option>
</select>
</td>
</tr>
<tr>
<td><a οnclick="getselect(document.form1.n1)" href="#">获取</a></td>
</tr>
</form>
</table>
<body>
</html>