jquery set selected for select element
2014-04-23 11:30
316 查看
//1 $("#Provider_" + counter + " option[value=" + FormData.ID + "]").attr('selected', 'selected'); //2 $("#Provider_" + counter + " option").filter(function () { return $(this).val() == FormData.ID; }).prop('selected', true); //3 $("#Provider_" + counter + " option").filter(function () { return $(this).val() == FormData.ID; }).attr('selected', true);
相关文章推荐
- PointPlay(document.getElementById('selectForPlay').value);
- Attribute "resultCalss" must be declared for element type "select".
- UIButton: set image for selected-highlighted state
- Jquery 报错 Uncaught InvalidStateError: Failed to set the 'value' property on 'HTMLInputElement':
- How do you select a particular option in a SELECT element in jQuery? - Stack Overflow
- Set `android:baselineAligned="false"` on this element for better performance
- jQuery 选中 select控件 无法设置selected
- jquery中select操作append、prepend、remove、find、val、get、selectedIndex、attr、option
- jquery select selected
- JQuery 绑定select标签的onchange事件,弹出选择的值,并实现跳转、传参(selected的值和页面其它元素的值)
- How to set up OpenERP for various timezone kindly follow the following steps to select timezone in OpenERP
- Creating the Value Set for a DropDownByKey Element
- dynamic create option element for select by javascript
- jquery json select tree for ruby on rails
- UIButton: set image for selected-highlighted state
- jQuery select 无法设置selected属性。未指明的错误
- ASP.NET 2.0 Menu Control: set static item selected when select its child dynamic items/选择men
- JQuery IE6 Could not set the selected property
- JQuery 绑定select标签的onchange事件,弹出选择的值,并实现跳转、传参(selected的值和页面其它元素的值)