1、html

<select class="form-control" >
<option value="-1" selected="selected">请选择</option>
<option value="1">男</option>
<option value="2">女</option>
</select>

2、option 回显/选中   $("#sex").val(data.sex);

3、option 取值   var sex = $("#sex option:selected").val();

4、radio 

radio  回显  $("#updateModal #workring").val(data.workring).attr("selected",true);

radio  选中 $("#updateModal #isweekday")[0].checked = "checked";

radio  取值 $("#updateModal #nonworkring option:selected").val();

5、下拉菜单选中

--------------------- 
作者:咸蛋超人
来源:博客园
原文:https://www.cnblogs.com/xdcr/p/6222573.html

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
相关资源
相似解决方案