jQuery实现动态选中select
2017-03-31 19:40
459 查看
// jquery实现动态选中select var active = $('.all_sla_title1 .active') var group_name = active.html(); var sla = active.attr('data-sla'); var remote = active.attr('data-remote'); // console.log(group_name + sla + remote); $.each($('#sla option'), function(i, n) { if ($(n).val() == sla) { $(n).attr("selected", true); } });
相关文章推荐
- 使用(jquery) 实现select 对option 的动态选中
- jquery实现动态操作select选中
- jquery实现动态操作select选中
- 使用Jquery动态选中Select控件选项
- jQuery获取Select选中的Text和Value,根据Value值动态添加属性
- jQuery实现select下拉框选中数据触发事件
- 实现select动态添加option并选中的多种方法
- Jquery+Ajax实现Select动态定数据
- jQuery怎么根据某个特定的值动态让select下的option选中
- Jquery multiselect 多选下拉框与ajax配合使用,动态拼接option。初始化默认选中多个,增加搜索框
- jquery实现select选中
- jQuery获取Select选中的Text和Value,根据Value值动态添加属性等
- jQuery获取Select选中的Text和Value,根据Value值动态添加属性等
- jQuery获取Select选中的Text和Value,根据Value值动态添加属性等
- jQuery select自动选中功能实现方法分析
- jQuery实现Select多选列表双击选中项时相互添加
- jQuery实现Select多选列表双击选中项时相互添加
- jQuery获取Select选中的Text和Value,根据Value值动态添加属性等
- jQuery怎么根据某个特定的值动态让select下的option选中
- jQuery获取Select选中的Text和Value,根据Value值动态添加属性等