首先是下拉框的回显
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | $("#worker").each(function () {     // this代表的是<option></option>,对option再进行遍历     $(this).children("option").each(function () {         // 判断需要对那个选项进行回显         if (this.value == 2 {             console.log($(this).text());             // 进行回显             $(this).attr("selected", "selected");         }     });     //必须刷新表单     form.render('select'); }); | 
其次是radio的单选框
| 1 2 3 | //将表单中的radio状态写到页面中  $("input:radio[name=comefrom][value = 2]").prop("checked", true); form.render('radio'); | 
原创文章,作者:蓝洛水深,如若转载,请注明出处:https://blog.lanluo.cn/9990
 
                
 微信扫一扫
                                                            微信扫一扫                                                     支付宝扫一扫
                                                            支付宝扫一扫                                                     
            