JS获取下拉框选中的值

function doSelect(){
			
			alert(document.getElementById("ethip").options[window.document.getElementById("ethip").selectedIndex].text);
		}

<select name="ethip"  id="ethip">
	<option>A</option>
       
         <option>B</option>

 </select>


<input type="button" id="eth" class="btn" value="提交" onclick="doSelect()"/>


你可能感兴趣的:(JS获取下拉框选中的值)