$(function () { var selects = $('#select1, #select2')change(function () { // jquery 16 以下请把prop改成attr selectsprop('selectedIndex', $(this)prop('selectedIndex')); });});
话不多说,请看代码:
//直接保存后缀htnl用谷歌浏览器打开,亲测有效
<head>
<script
src=">
<select id="selects">
<option value="0" selected>1</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
<div id="result"></div>
--------------------------------------------------------
$("#selects")change(function(){ //下拉框改变时取得值
$("#result")html($(this)val()); //显示值
});
以上就是关于怎么用jQuery获取 jeecg dictselect 下拉框的值全部的内容,包括:怎么用jQuery获取 jeecg dictselect 下拉框的值、jQuery实现select下拉框获取当前选中文本、值、索引、利用JQuery动态获取下拉框的值,在jsp页面上显示。等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)