var radio_types = document.getElementsByName ( "radio_type" ); for ( var I = 0; I <radio_types.length; I ++ ) { IF (radio_types [I] == .Value _type) { $ ( "#" + radio_types [I ] .id) .prop ( "the checked", to true ); // do not add the following code line does not work above layui.use ([ 'form', 'Layer'], function () { var form = layui. form; form.render (); }); BREAK ; } }