jQuery取值大全
获取下拉列表的值:
<select id="status" style="width: 188">
<option value="-1" selected="selected">===请选择===</option>
<option value="0">正常</option>
<option value="1">注销</option>
</select>
var status = $('#status').children('option:selected').val();
<select id="department" style="width: 188">
<option selected="selected" val="">===请选择===</option>
</select>
把数据库的值读到下拉列表中:
//查询部门下拉列表的值
$('#department ').combobox({
url:'<%=path%>/admin/department/UPNAME.dox',
valueField:'UPID',
textField:'UPNAME',
listHeight: 12
});
在本页面中用jQuery获得选中的值:
var department = $('#department ').combobox('getValue');
相关推荐
专注前端开发 2020-10-21
苏康申 2020-11-13
vitasfly 2020-11-12
oraclemch 2020-11-06
liuyang000 2020-09-25
FellowYourHeart 2020-10-05
赵继业 2020-08-17
whyname 2020-08-16
Seandba 2020-08-16
dbasunny 2020-08-16
拼命工作好好玩 2020-08-15
langyue 2020-08-15
写程序的赵童鞋 2020-08-03
Accpcjg 2020-08-02
tydldd 2020-07-30
好记忆也需烂 2020-07-28
jianghero 2020-07-28