//单选框
<input type="radio" name="radio_bnt_wid" id="radio_bnt_wid_1" >
<input type="radio" name="radio_bnt_wid" id="radio_bnt_wid_2" >
<input type="radio" name="radio_bnt_wid" id="radio_bnt_wid_3" >
<input type="radio" name="radio_bnt_wid" id="radio_bnt_wid_4" >
//js代码
//选中的状态
let state = 2;
$('#radio_bnt_wid_'+state+'').attr("checked", true);//设置属性为true
form.render();//表单重新渲染一遍,最重要的,否则无效
版权声明:本文为yuzheh521原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。