function setVar(v_sel){
var oldVal = document.form.outPut.value
var selValue = v_sel.options[v_sel.selectedIndex].value
document.form.outPut.value = oldVal + selValue +'/n'
}
<select name="stu.stu_teacher" id="stu.stu_teacher"/><option value="<s:property value='#session.student.stu_teacher'/>" selected><s:property value='#session.student.stu_teacher'/></option>
<s:iterator value="#session.teacher" id="teacher">
<option value="<s:property value='#teacher.teacher_name'/>"><s:property value='#teacher.teacher_name'/>橘或毕</option>
</s:iterator>
</select>圆芹
我用的团悔s标签,你改成c标签试试
下拉框里的默认值为选择的:<%String m=String.valueOf(request.getAttribute("m"))%>
<select name="excel.month" >
<option value="1" <%="1".equals(m)?"selected":"" %>>1</option>
<option value="2" <%="2".equals(m)?"selected":"" %>>2</option>
<option value="3" <%="3".equals(m)?"selected":"" %>>3</option>
<option value="4" <%="4".equals(m)?"selected":"" %>>4</option>
<option value="5" <%="5".equals(m)?"selected":"" %>>5</option>
<option value="6" <%="6".equals(m)?"selected":"" %>>6</option>
<option value="7" <%="7".equals(m)?"selected":"" %>>7</option>
<option value="8" <%="8".equals(m)?"selected":"" %>>8</option>
<option value="9" <%="9".equals(m)?"selected":"" %>>9</option>
<option value="10" <%="10".equals(m)?"selected":"" %>>10</option>
<option value="11" <%="11".equals(m)?"selected":"" %>>11</option>
<option value="12" <%="12".equals(m)?"selected":"" %>>12</option>
</select>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)