layuiradio回显
- 
        
        Layui开发下拉框及单选框radio回显首先是下拉框的回显 12345678910111213$("#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的单选框 123//将表单中的radio状态写到页面中$("input:radio[name=comefrom][value = 2]").prop("checked", true);form.render('radio');
 
                 
         
                    