jquery获取当前select下拉选的属性值
body中:
<li> <select id="select_phone"></select> <input type="button" id="huoqu" value="huoqu"/> </li>
jquery实现:
获取option的值:
$("#huoqu").click(function(){ var text = $("#select_phone")[0].options[$("#select_phone")[0].selectedIndex].text; alert(text); });
获取option的value值:
$("#huoqu").click(function(){ var value = $("#select_phone")[0].options[$("#select_phone")[0].selectedIndex].value; alert(value); });