jsp代码:
1 <label>性  别</label>

2 <input type="radio" value="1" name="sex"/><label>男</label>

3 <input type="radio" value="2" name="sex"/><label>女</label>   

js:

$(":radio[name='sex'][value='" + sex + "']").prop("checked", "checked");

 注:sex的值为从数据库查出,想办法接收即可。

相关文章:

  • 2022-01-19
  • 2022-02-03
  • 2022-12-23
  • 2022-12-23
  • 2022-01-25
  • 2022-12-23
  • 2021-12-11
  • 2022-12-23
猜你喜欢
  • 2021-07-30
  • 2022-12-23
  • 2022-02-10
  • 2021-10-24
  • 2021-11-08
  • 2022-12-23
相关资源
相似解决方案