layui添加后重新渲染添加页面----------------------亲测可行,希望能有更多晓得layui常用的大佬留言

  

1 //#add_sys_cfg 是添加页面的那个总div的id
2 $(':input', '#add_sys_cfg').not(':button,:submit,:hidden,:radio').val('').removeAttr('checked').removeAttr('selected');
3                     
4 //之前在表单中设置的默认值
5 $("#dev_detail").find("input[name='cycle']").val("1000");
6 //从新渲染            
7 form.render();

猜你喜欢

转载自www.cnblogs.com/a973692898/p/11582349.html