日期:2014-05-17  浏览次数:20653 次

JSP页面中获得单选菜单值的问题 求指导
function addSelect(){
   
var sel=document.getElementById("time");
sel_value = sel.options[sel.selectedIndex].value;
alert(sel_value);
return sel_value;
}

--></script>
</head>

<body>
<div>
<table width="813" border="1" cellpadding="5" cellspacing="1" bordercolor="#EEEEEE" width="831" align="center">
<tr>
<td width="94" align="center">序号</td>
<td width="196" align="center">产品名称</td>
<td width="176" align="center">产品编号</td>
<td width="104" align="center">费用</td>
<td width="150" align="center">备注</td>
<td width="150" align="center">订购月数</td>
<td width="150" align="center">订购</td>
</tr>
<s:iterator value="#session.userSelectPayChannelBeanList" status="index"> 
<tr>
<td align="center" class="w04"><s:property value = "#index.index+1"/></td>
<td align="center" class="w04"><s:property value = "getProductName()"/></td>
<td align="center" class="w04"><s:property value = "getProductNo()"/></td>
<td align="center" class="w04"><s:property value = "getMonthlyFee()"/></td>
<td align="center" class="w04"><s:property value = "getRemarks()"/></td>
<td align="center" class="w04"> 
<select name="selectPayChannelTime" id="time" onchange="addSelect()">
<option value="1">一年</option>
<option value="2">二年</option>
<option value="3">三年</option>
<option value="4">1个月</option>
<option value="5">2个月</option>
<option value="6">3个月</option>
<option value="7">4个月</option>
<option value="8">5个月</option>
<option value="9">6个月</option>
<option value="10">7个月</option>
<option value="11">8个月</option>
<option value="12">9个月</option>
<option value="13">10个月</option>
<option value="14">11个月</option>
<option value="15">12个月</option>
<option value="16">13个月</option>
<option value="17">14个月</option>
<option value="18">15个月</option>
<option value="19">16个月</option>
<option value="20">17个月</option>
<option value="21">18个月</option>
<option value="22">19个月</option>
<option value="23">20个月</option>
<option value="24">21个月</option>
<option value="25">22个月</option>
<option value="26">23个月</option>
</select>
</td>
<s:hidden name =