日期:2014-05-16  浏览次数:20371 次

Jsp中下拉列表

?

js中

function selectInverter() {
	var inverteruuidvalue=document.getElementById("inverteruuid").value;
	var inverternamevalue=document.getElementById("inverteruuid").options[inverteruuid.selectedIndex].innerHTML;
		window.location = "<%=basePath%>PowerAction!realTime?inverterUUID=" + inverteruuidvalue+"&inverterSelect="+inverternamevalue;
	}

?Html

??

<form>
					Inverter: <select id="inverteruuid" onchange="selectInverter()" >
								<option selected="selected" value="<s:property value="inverterSelect" />"><s:property value="inverterSelect" /></option>
							<s:iterator value="listInverter">
								<option value="<s:property value="inverterUUID" />">
									<s:property value="inverterName" />
								</option>
							</s:iterator>
					</select>
					</form>

?

?